search for: zyang

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

Did you mean: zhang
2002 Dec 18
6
Can I build an array of regrssion model?
...ecewise linear regression to approximate a nonlinear function. Actually, I don't know how many linear functions I need, therefore, I want build an array of regression models to automate the approximation job. Could you please give me any clue? Attached is ongoing code: rawData = scan("c:/zyang/mass/data/A01/1.PRN", what=list(numeric(),numeric())); len = length(rawData[[1]]); cuts = len*c(0.01, 0.03, 0.08, 0.18, 0.38, 0.69, 1); cuts = as.integer(cuts); mod1 = lm(rawData[[2]][1:cuts[1]]~rawData[[1]][1:cuts[1]]); mod2 = lm(rawData[[2]][cuts[1]:cuts[2]]~rawData[[1]][cuts[1]:cuts[2]]);...