[R] error in step.gam
Kim Vanselow
Vanselow at gmx.de
Wed Jul 7 16:16:46 CEST 2010
Dear r-helpers,
I use function step.gam (package gam, T. Hastie) with several explanatory variables to build a model. Unfortunately, I obviously have too many variables. This message occurs on my 4 core 64bit machine with 8GB RAM in R2.11.1 for Windows (64bit build):
Error in array(FALSE, term.lengths) : 'dim' specifies too large an array
I read that this message occurs when running out of RAM. So, the question is:
Could it maybe help to run step.gam as a parallel process on more then 1 core and is parallel processing possible with this function?
I tried to manage it with snowfall, but with no success.
Any help would be greatly appreciated!
Thanks,
Kim
This is my step.gam code:
fit0 = gam( Vegetation ~ 1, family = binomial, data = d )
gam.scope = list(
~ 1 + ALTITUDE + s(ALTITUDE, 2),
~ 1 + SLOPE + s(SLOPE, 2),
~ 1 + SOUTH_EXPOSEDNESS + s(SOUTH_EXPOSEDNESS, 2),
~ 1 + WEST_EXPOSEDNESS + s(WEST_EXPOSEDNESS, 2),
~ 1 + VCURV + s(VCURV, 2),
~ 1 + HCURV + s(HCURV, 2),
~ 1 + PRECIPITATION_ANNUAL_MEAN + s(PRECIPITATION_ANNUAL_MEAN, 2),
~ 1 + PRECIPITATION_JULY + s(PRECIPITATION_JULY, 2),
~ 1 + PRECIPITATION_JANUARY + s(PRECIPITATION_JANUARY, 2),
~ 1 + DISTANCE_TO_ISOBATH + s(DISTANCE_TO_ISOBATH, 2),
~ 1 + VERTICAL_DISTANCE_TO_ISOBATH + s(VERTICAL_DISTANCE_TO_ISOBATH, 2),
~ 1 + HORIZONTAL_DISTANCE_TO_ISOBATH + s(HORIZONTAL_DISTANCE_TO_ISOBATH, 2),
~ 1 + UTM_EASTING + s(UTM_EASTING, 2),
~ 1 + UTM_NORTHING + s(UTM_NORTHING, 2),
~ 1 + DISTANCE_TO_SETTLEMENT + s(DISTANCE_TO_SETTLEMENT, 2),
~ 1 + Bd_1_Mean + s(Bd_1_Mean, 2),
~ 1 + Bd_2_Mean + s(Bd_2_Mean, 2),
~ 1 + Bd_3_Mean + s(Bd_3_Mean, 2),
~ 1 + Bd_4_Mean + s(Bd_4_Mean, 2),
~ 1 + Bd_5_Mean + s(Bd_5_Mean, 2),
~ 1 + Bd_1t_Mean + s(Bd_1t_Mean, 2),
~ 1 + Bd_2t_Mean + s(Bd_2t_Mean, 2),
~ 1 + Bd_3t_Mean + s(Bd_3t_Mean, 2),
~ 1 + Bd_4t_Mean + s(Bd_4t_Mean, 2),
~ 1 + Bd_5t_Mean + s(Bd_5t_Mean, 2),
~ 1 + NDVI_IR_R_Mean + s(NDVI_IR_R_Mean, 2),
~ 1 + NDVI_IR_Rededge_Mean + s(NDVI_IR_Rededge_Mean, 2),
~ 1 + NDVI_Rededge_R_Mean + s(NDVI_Rededge_R_Mean, 2),
~ 1 + ReTCI_Mean + s(ReTCI_Mean, 2),
~ 1 + NDVI_IR_R_t_Mean + s(NDVI_IR_R_t_Mean, 2),
~ 1 + NDVI_IR_Rededge_t_Mean + s(NDVI_IR_Rededge_t_Mean, 2),
~ 1 + NDVI_Rededge_R_t_Mean + s(NDVI_Rededge_R_t_Mean, 2),
~ 1 + ReTCI_t_Mean + s(ReTCI_t_Mean, 2))
gam.scope
fit = step.gam(fit0, scope = gam.scope, direction = "both", trace = TRUE)
The error occurs with the function step.gam.
--
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
More information about the R-help
mailing list