[R] interpretation of RCS 'coefs' and 'knots'

Dylan Beaudette debeaudette at ucdavis.edu
Sat Oct 24 00:46:48 CEST 2009


Hi,

I have fit a series of ols() models, by group, in this manner:

l <- ols(y ~ rcs(x, 4))

... where the series of 'x' values in each group is the same, however knots 
are not always identical between groups. The result is a table of 'coefs' 
derived from the ols objects, by group:

group	Intercept       top     top'    top''
1      	 6.864   0.01    2.241   -2.65
2      	 6.836   0.047   -0.556  0.606
3      	 5.877   -0.019  0.084   -0.175
4       	6.021   -0.003  0.121   -0.128
5       	7.164   0.014   0.031   -0.096

I would like to describe groups of relationships, based on the coefficients, 
however I am not sure if they are directly comparable. In addition, I would 
like to regress these coefs on another set of variables, with the aim of 
predicting a series of RCS coefficients along external gradients. In essence, 
I am hoping to use RCS coefficients to summarize y ~ rcs(x), in a way that 
can then me modeled like this: [y ~ rcs(x)] ~ z.

Is this interpretation of RCS coefficients even possible? If not, would 
forcing knot locations make it a possibility? Or, would modeling both knots 
and RCS coefs with external variables lead to sensible predictions?

Cheers,
Dylan

-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341




More information about the R-help mailing list