[R] typsize and fscale arguments to nlm

John Fox jfox at mcmaster.ca
Tue Jul 23 00:43:12 CEST 2002

Dear R list members,

I have a question about the proper use of the typsize and fscale arguments 
to nlm.

I use nlm in my sem package to fit general structural-equation models, 
which entails maximizing a multinormal likelihood with respect to 
parameters that represent regression coefficients and covariances of 
variables. The magnitudes of these parameters can be very different.

The documentation for typsize is rather terse: "an estimate of the size of 
each parameter at the minimum," with the default typsize=rep(1, length(p)) 
[where length(p) gives the number of parameters]. Am I correct in 
interpreting the "size of each parameter" as its absolute values? If so, is 
it reasonable to specify typsize=abs(start), where start contains that 
start values of the parameters? I can compute start values that have 
generally reasonable magnitudes (certainly more generally reasonable than 
assuming that all parameters are of the same magnitude) and that will never 
be identically 0. A related question is whether typsize specifies the 
relative or absolute "sizes" of the parameters.

Finally, there is another argument to nlm called fscale which specifies "an 
estimate of the size of f at the minimum" (where f is the function to be 
minimized -- in my case the negative log-likelihood). The default is 
fscale=1. In experimenting with nlm I've found that using 
typsize=abs(start) appears to make my sem function more robust (e.g., less 
sensitive to start values when the parameters are of very different 
magnitudes), but setting fscale to the log-likelihood at the start values 
for the parameters seems to create problems.

Any help, advice, or additional information would be appreciated. (I plan 
to take a look at the Dennis and Schnabel text cited in the help file for 
nlm but have not yet done so.)

John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox at mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list