Displaying 1 result from an estimated 1 matches for "stdg".
Did you mean:
std
2010 Jan 26
3
Problem with "nls" function
...e="y.csv",head=FALSE,sep=";")
Y=y[,1]
D_1=mat[,1]
D_2=mat[,2]
D_3=mat[,3]
D_4=mat[,4]
Y_1=mat[,5]
Y_2=mat[,6]
Y_3=mat[,7]
Y_4=mat[,8]
s_F=mat[,9]
s_G=mat[,10]
L.minor=data.frame(Y=Y,D_1=D_1,D_2=D_2,D_3=D_3,D_4=D_4,Y_1=Y_1,Y_2=Y_2,Y_3=Y_3,Y_4=Y_4,s_F=s_F,s_G=s_G)
stdS=1/(sd(s_F))
stdG=1/(sd(s_G))
L.minor.m1<-nls(Y~a_1_1*D_1+a_2_1*D_2+a_3_1*D_3+a_4_1*D_4+a_1_2*(exp(-gamma_1_F*stdS*(s_F-c_1_F))+exp(gamma_2_F*stdS*(s_F-c_2_F)))/(1+exp(-gamma_1_F*stdS*(s_F-c_1_F))+exp(gamma_2_F*stdS*(s_F-c_2_F)))*D_1+a_2_2*(exp(-gamma_1_F*stdS*(s_F-c_1_F))+exp(gamma_2_F*stdS*(s_F-c_2_F)))/(1+exp(...