Re: [R] Subsetting a named list of parameters in mle

2014-02-15 Thread Bert Gunter
fit is initialized as a vector of integers. How can you assign an mle fit to an element of an integer vector? Initialize fit as a list, use lapply, or whatever. Have you read An Intro to R (ships with R) or other R (e.g. web) tutorial? This looks like the sort of basic misunderstanding that one wh

[R] Subsetting a named list of parameters in mle

2014-02-15 Thread John Hodgson
I have a 7-parameter model to fit using mle. I would like to generate fits for all pairs of parameters (with others fixed) The following code looked like it should work: library(stats4) # dummy mll function for sake of example mll = function (lnk=1.5,lnhs=-5,lnhi=-5,lnss=-5,lnsi=-5,lnws=-5,l