[R] on using gam(gam)

2006-04-17 Thread Liu Song
Dear R users, I am using R-function gam(gam) to fit additive models, more specifically partially linear models. Say, Y~x1+x2+s(z,df=d). Is there a way to extract the smoother matrix for the smoothing term z, or is there a way to extract the overall hat matrix H such that Y_hat=HY. Thank you in

[R] R: On using gam(gam).

2006-04-14 Thread Liu Song
Dear R users, I am using R-function gam(gam) to fit additive models, more specifically partially linear models. Say, Y~x1+x2+s(z,df=d). Is there a way to extract the smoother matrix for the smoothing term z, or is there a way to extract the overall hat matrix H such that Y_hat=HY. Thank you in

[R] as.formula and lme ( Fixed effects: Error in as.vector(x, list) : cannot coerce to vector)

2005-08-12 Thread Liu Song
This is a continuing issue with the one on the list a long time ago (I couldn't find a solution to it from the web): -- Using a formula converted with as.formula with lme leads to an error message. Same works ok with lm,

[R] need help on GAM

2004-10-12 Thread Liu Song
Get some question about the function gam. Suppose I have a semiparametric model, Y~x1+x2+s(z1). Using gam, how could I get the estimates for the parametric part and nonparametric part respectively? And another question: we could find the coefficients for both parametric term and nonparametric