On Nov 27, 2012, at 7:44 AM, Keith Jewell wrote:
In this context, "linear model" means linear in the _coefficients_
not (necessarily) linear in the predictors, so your model:
JIM ~ z1*A + z2*B + z3*A*B^2 + z4*C*D^3 + z5*A^2*B^2 ...
is a linear model (in z1, z2, ...).
So you don't need to use nls, lm is probably favourite. You can use
all the techniques around for evaluating linear models; anova.lm
might give you a start.
The additional R coding tip would be the I() function,
lm(JIM ~ B + A*I(B^2) + I(C*D^3) + I(A^2*B^2) + ...
Note that A and I(B^2) would also get estimates because of the way "*"
is interpreted in formulas. If the "*" is inside the I() function that
interpretation is not expanded.
In the linear models context it might be wiser to forego this approach
and instead use regression splines.
--
David.
KJ
On 27/11/2012 11:40, dsfakianakis wrote:
Dear all,
I have a set of data with 4 inputs (independent variables) and one
output
(dependent variable). I want to perform a regression analysis in
order to
fit these data to a regression model, however due to the non-
linearity of
the model I do not have a clue which equation to use. I am thinking
of
starting with a very general equation including ^3 terms and
interactions
between the variables however this will lead to a very long
equation. Is
there a way to assess the effect of each term to the accuracy of the
regression model in order to discard the terms with the least
importance?
Something like a sensitivity analysis of the effect of each term to
the
accuracy regression model. I know one possible solution to my
problem is
simply 'trial and error' however before going down that road I want
to check
if there is an easier way.
e.g. Let's say I have four input variables A B C and D, one output
'JIM' and
let z1, z2, ... be the coefficients of the terms of the equation.
The
regression will be something like that:
Result = nls(JIM ~ z1*A + z2*B + z3*A*B^2 + z4*C*D^3 +
z5*A^2*B^2 ... )
Is there a way to assess the contribution of each term (z1*A,
z3*A*B^3 etc)
to the accuracy of the regression model?
Thanks a lot
--
View this message in context:
http://r.789695.n4.nabble.com/Effect-of-each-term-in-the-accuracy-of-Nonlinear-multivariate-regression-fitting-equation-tp4650949.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
Alameda, CA, USA
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.