[R] explaining a model with rcs() terms
Dylan Beaudette
dylan.beaudette at gmail.com
Mon Dec 1 04:23:54 CET 2008
Hi, I am using the rcs() function in the Design library to model
non-linearity that is not well characterized by an otherwise
mechanistic function. I am able to make the model 'available' to
others through the excellent nomogram() function and the set of tables
that it can create. However, I would like to present the model in an
'expanded' format-- probably what rcspline.restate() or latex.Design()
produce on a model fit object.
Here is how the model was fit:
fit.ols <- ols( log(k) ~ (rcs(activity) * (log(conc) + sar)) +
(rcs(sand) * (log(conc) + sar)), data=sm.clean, x=TRUE, y=TRUE)
Here is how I am accessing the 'expanded' format of the model structure:
options(digits=3)
latex(fit.ols, file='fit_rcs.tex')
The output contains several notation elements that I am not familiar with:
1. x_{+} --> it seems that this represent a term that should be set
to 0, when x is 0?
i.e. the entire expression −453(activity − 0.842)_{+}^{3} = 0 when
'activity' = 0 ??
2. the '!x' found in :
+log(conc) [ −0.0118sand + 9.58
! ×
!10−6 (sand − 11.6)
− 0.000128(sand − 37.5)
+0.00045(sand − 47.2)
− 0.000350(sand − 51)
+ 1.86
! ×
!10−5 (sand − 69.8) ]
.... what exactly does that mean?
An image version of the equation in question is attached.
Any input would be greatly appreciated!
Cheers,
Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: complex_equation.png
Type: image/png
Size: 108200 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20081130/5e6f6bea/attachment.png>
More information about the R-help
mailing list