[R] Missing variable in new dataframe for prediction

2007-02-13 Thread LE TERTRE Alain
Hi, I'm using a loop to evaluate several models by taking adjacent variables from my dataframe. When i try to get predictions for new values, i get an error message about a missing variable in my new dataframe. Below is an example adapted from ?gam in mgcv package library(mgcv) set.seed(0)

[R] Automatically updating GLM object

2003-10-22 Thread LE TERTRE Alain
Dear all, i generated several GLM objects, named myobject1 to myobject25. Now i'd like to update both of them. So i tried: for(ii in 1:25) { assign(paste(myobject.updated, ii, sep=), update( myobject[ii] ,.~ + VAR2)) } Doesn't work I also tried to get all the names in a vector and

RE : [R] Automatically updating GLM object

2003-10-22 Thread LE TERTRE Alain
1 41 79 67 68 email: [EMAIL PROTECTED] -Message d'origine- De : Prof Brian Ripley [mailto:[EMAIL PROTECTED] Envoyé : mercredi 22 octobre 2003 09:56 À : LE TERTRE Alain Cc : [EMAIL PROTECTED] Objet : Re: [R] Automatically updating GLM object What does Doesn't work

[R] attributing names in predicted type=terms gam object

2003-09-17 Thread LE TERTRE Alain
Hi, suppose i have a gam object gamobject- gam( Y~ s(X1)+s(X2)+ X3) I would like to extract the predicted partial effect of X3 but selecting it by its name, as it's to be included in a function and i don't always know the exact position of X3. something like