<div>Dear All:</div><div><br></div><div>I&#39;m getting the following error when loading the GAM model:</div><div><br></div><div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">&gt; load(&quot;models/SPECIES1_GAM_full&quot;)</span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">&gt; SPECIES1_GAM_full</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);"><br></span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Family: binomial </span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Link function: logit </span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);"><br></span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Formula:</span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">SPECIES1 ~ s(BAND5, 3) + s(BAND7, 3)</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);"><br></span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Estimated degrees of freedom:</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Error in x$smooth[[i]]$first.para : </span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">  $ operator is invalid for atomic vectors</span></div><div><br></div><div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">&gt; summary(SPECIES1_GAM_full)</span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">NULL</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Formula:</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">NULL</span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);"><br></span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Error in if (x$m &gt; 0) { : argument is of length zero</span></div>

</div></div><div><br></div><div>While the GLM model returns the following:</div><div><br></div><div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">&gt; load(&quot;models/SPECIES1_GLM_full&quot;)</span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">&gt; SPECIES1_GLM_full</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);"><br></span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Call:  glm(formula = SPECIES1 ~ I(BAND7^3) + BAND4 + I(BAND5^2), family = binomial,      data = DataBIOMOD[calib.lines, ], weights = Yweights[calib.lines,          i]) </span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);"><br></span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Coefficients:</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">(Intercept)   I(BAND7^3)        BAND4   I(BAND5^2)  </span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);"> -6.566e-01   -3.090e-06   -1.373e-02    1.527e-04  </span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);"><br>

</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Degrees of Freedom: 342 Total (i.e. Null);  339 Residual</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Null Deviance:      467.3 </span></div>

<div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">Residual Deviance: 428.4        AIC: 436.4 </span></div></div><div><br></div><div>My model setup parameters are as follows:<br></div><div><br>

</div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">&gt; Models(GLM = T, TypeGLM = &quot;quad&quot;, Test = &quot;AIC&quot;, GBM = F, No.trees = 3000, GAM = T, CTA = F, CV.tree = 50, ANN = F, CV.ann = 2, SRE = F, Perc025=T, Perc05=F, MDA = F, MARS = F, RF = F, NbRunEval = 2, DataSplit = 80, Yweights=NULL, Roc=T, Optimized.Threshold.Roc=T, Kappa=T, TSS=T, KeepPredIndependent = F, VarImport=5, NbRepPA=0, strategy=&quot;circles&quot;, coor=CoorXY, distance=2, nb.absences=1000)</span><br>

</div><div><br></div><div>Am I missing something?</div><div><br></div><div>Thanks in advance for the assistance.</div><div><br></div><br>-- <br>Mit freundlichen Grüßen/Regards<br>__________________________________<br>Hakim Abdi<br>

Erasmus Mundus Master&#39;s Programme<br><br>Institut für Geoinformatik<br>Universität Münster<br>32U 5755408.16mN, 404463.35mE<br><a href="http://ifgi.uni-muenster.de">ifgi.uni-muenster.de</a><br><br>Instituto Superior de Estatística e Gestão de Informação<br>

Universidade Nova de Lisboa<br>29S 4287095.5mN, 486099.7mE<br><a href="http://www.isegi.unl.pt">www.isegi.unl.pt</a><br><br><a href="http://www.geospatialtechnologist.com">www.geospatialtechnologist.com</a><br>