From: Stefaan Lhermitte <stefaan.lhermitte_at_biw.kuleuven.be>

Date: Fri 18 Mar 2005 - 01:13:25 EST

sum(x)=1}

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Mar 18 01:28:12 2005

Date: Fri 18 Mar 2005 - 01:13:25 EST

min || Cx - d || ² where sum(x) = 1.

# Take an arbitrary d

d<-c(10, 20, 20)

# Define the function

fr <- function(x) {

C[1,]*x=d C[2,]*x=d C[3,]*x=d

sum(x)=1}

# Perform the optimization

optim(c(0.25,0.25,0.25),fr)

But it did not work. I got the eror couldn't find function. Can anyone tell me what functyion I should use for my problem and how should I program it?

Thanx in advance,

Stef

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Mar 18 01:28:12 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:30:50 EST
*