LM with summation function
On May 18, 2012, at 1:44 PM, Robbie Edwards wrote:
Hi all, I'm trying to model some data where the y is defined by y = summation[1 to 50] B1 * x + B2 * x^2 + B3 * x^3 Hopefully that reads clearly for email.
cumsum( rowSums( cbind(B1 * x, B2 * x^2, B3 * x^3)))
Anyway, if it wasn't for the summation, I know I would do it like this lm(y ~ x + x2 + x3) Where x2 and x3 are x^2 and x^3. However, since each value of x is related to the previous values of x, I don't know how to do this. Any help is greatly appreciated.
David Winsemius, MD West Hartford, CT