search for: initp

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

Did you mean: init
2009 Aug 10
1
manipulating text to generate different formulas to use in nls()
...<- paste("P", 1:n, sep="") freqs <- paste("f", 1:n, sep="") ( premodl <- paste(amps, " * cos(2*pi*", freqs, "*x - ", phas, ")", sep="") ) ## In the two following instructions, "modl" and "initP" are defined by hand. This is what I want to generate "automagically" depending on the number of harmonics (n). ( modl <- paste("y ~ mu", premodl[1],premodl[2], premodl[3], premodl[4], sep=" + ") ) ( initP <- list(mu=sum(inip$a0), A1=inip$Am...