I used the command below, but R gives me the error message--syntax error.
can anyone see the mistakes I made?


optimize(function(x,y)
+ ((327.727-(1-0.114^10)*y*(1-x)/x/(1-x^y))+(9517.336-327.727 *(1+(1-x)*(1+y)/x-327.727)))^2
+ interval=c(0,1))


At the same time, I use nlm() but R gives me the code 

$code
[1] 3

function(vals) { 

        x <- vals[1] 

        y <- vals[2] 

        sum(c((199.458913633542-(1-0.114^10)*y*(1-x)/x/(1-x^y)),(5234.11964684527-199.458913633542*(1+(1-x)*(1+y)/x-199.458913633542)))^2)

}

  

nlm(f, c(2,2))







Any one know how to deal with this case?

Thanks

Xin


	[[alternative HTML version deleted]]

