search for: sce_yest

Displaying 1 result from an estimated 1 matches for "sce_yest".

2005 Apr 01
1
optim problem, nls regression
...-c(0,8,21,35) Hence, the sum of squares is: Sce= sum( sum((y- number[4]-(x/number[1])^number[7])^2)+ sum((y- number[5]-(x/number[2])^number[7])^2)+ sum((y- number[6]-(x/number[3])^number[7])^2)+ for minimising this sum, I compute the function "sce": sce<-function(param){ sce_yest<-matrix(nrow=3,ncol=1) for( i in 1:3){ yy<-(y[((long[i]+1):long[i+1])]) xx<-x[(long[i]+1):(long[i+1])] y_est<-(param[i+2]-(xx/param[i])^param[(2*3)+1]) sce_yest[i,]<-sum((yy-y_est)^2) } return(sum(sce_yest)) } Then, I use the fonction optim for obtaining a vector of 7 paramete...