search for: colorblue

Displaying 1 result from an estimated 1 matches for "colorblue".

2010 Mar 19
2
Factor variables with GAM models
...have in my data set are automatically converted into a series of binomial variables. For example, if I have a data.frame with a column named color and values "red", "green", "blue". The lm function automatically replaces it with 3 variables colorred, colorgreen, colorblue which are binomial {0,1} When I use the gam function, R doesn't do this so I get an error. 1) Is there a way to ask the gam function to do this conversion for me? 2) If not, is there some other tool or utility to make this data transformation easy? 3) Last option - can I use lm to transform...