[R-sig-Geo] predict gam model....
Manuel Schneider
manuel.schneider at art.admin.ch
Fri Jan 14 08:12:30 CET 2011
Horacio Samaniego <horacio.samaniego <at> gmail.com> writes:
>
> Hi,
> I'm having some trouble on a very basic operation it seems.... I am
> not successful generating GAM predictions on a grid. I suspect an
> issue with NA's but are not sure what it is. I get the following
> error:
>
> > preds[["gam1"]]=predict(gam4.1,newdata=clima4.1,type="response")*100
> Error in `[[<-.data.frame`(`*tmp*`, i, value = c(NA, NA, 0.259444360380994, :
> replacement has 88486 rows, data has 996705
Not sure whether predict.gam operates on a SGDF.
Have you tried newdata=clima4.1 at data ?
Abw
Manuel
>
> Any hint on where the discrepancy between rows come from?....
> basically, don't think that I'm fully understanding the error.
>
> Thanks,
>
More information about the R-sig-Geo
mailing list