Hi all, I'm working with a dataset from 10 treatments, each treatment with 30 subjects, each subject measured 5 times. The plot of the dataset suggests that a 3-parameter logistic could be a reasonable function to describe the data. When I try to fit the model using gnls I got the message 'Step halving factor reduced below minimum in NLS step'. I´m using as the initial values of the parameters those obtained from the nls fit. Is a problem of the initial estimates of the parameters that I get the error or could be something else? The code for the nls fit was: options(contrasts=c("contr.helmert","contr.poly")) VA1.lis<-nlsList(DRAM~SSlogis(MED,phi1,phi2,phi3)|TRAT, data=VA1,na.action=na.omit) The code for the gnls fit was (using a 'difference parameterization' like SAS): options(contrasts=c("contr.SAS","contr.poly")) VA1.gnls<-gnls(DRAM~SSlogis(MED,phi1,phi2,phi3), data=VA1,params=list(phi1~TRAT,phi2~TRAT,phi3~TRAT), start=c( 23.36209, ****avg of phi1 for the 10 trts ********* -0.854979000000004, ***** diff. between avg and nls estimate of TRAT#2 ****** .....and so on I´d appreciate any comment Thanks CM
Hi all, I'm working with a dataset from 10 treatments, each treatment with 30 subjects, each subject measured 5 times. The plot of the dataset suggests that a 3-parameter logistic could be a reasonable function to describe the data. When I try to fit the model using gnls I got the message 'Step halving factor reduced below minimum in NLS step'. I´m using as the initial values of the parameters those obtained from the nls fit. Is a problem of the initial estimates of the parameters that I get the error or could be something else? The code for the nls fit was: options(contrasts=c("contr.helmert","contr.poly")) VA1.lis<-nlsList(DRAM~SSlogis(MED,phi1,phi2,phi3)|TRAT, data=VA1,na.action=na.omit) The code for the gnls fit was (using a 'difference parameterization' like SAS): options(contrasts=c("contr.SAS","contr.poly")) VA1.gnls<-gnls(DRAM~SSlogis(MED,phi1,phi2,phi3), data=VA1,params=list(phi1~TRAT,phi2~TRAT,phi3~TRAT), start=c( 23.36209, ****avg of phi1 for the 10 trts ********* -0.854979000000004, ***** diff. between avg and nls estimate of TRAT#2 ****** .....and so on I´d appreciate any comment Thanks CM