# [S] Problems with GAM using lo(x1,x2)

Richard Tucker (rtucker@www-vdc.fas.harvard.edu)
Sun, 1 Nov 1998 21:54:55 -0500 (EST)

We are doing some GAM analyses in S-Plus (3.4 HP Unix) using the
construction:

term (regardless of permutation) and do worse in terms of residual
with many other variables for previous studies and it always worked fine
(at least we never saw a negative chi square before!).

Any suggestions/help will be greatly appreciated.

- Richard Tucker (rtucker@www-vdc.fas.harvard.edu)
- Neal Beck (beck@ucsd.edu)

----------------------------------------------------------------------

Here is the relevant output from the most recent runs:

democrat + s(py) + lo(degequal), family = binomial, data = jprtri3)

Deviance Residuals:
Min 1Q Median 3Q Max
-0.9582856 -0.2157935 -0.1306208 -0.08815663 4.02166

(Dispersion Parameter for Binomial family taken to be 1 )

Null Deviance: 8047.795 on 30198 degrees of freedom

Residual Deviance: 6247.637 on 30172.86 degrees of freedom

Number of Local Scoring Iterations: 7

DF for Terms and Chi-squares for Nonparametric Effects

Df Npar Df Npar Chisq P(Chi)
(Intercept) 1
lo(distance) 1 3.1 9.8713 0.0216630
democrat 1
s(py) 1 3.0 262.9459 0.0000000
lo(degequal) 1 3.3 67.8542 0.0000000

0.75) + democrat + s(py) + lo(degequal), family = binomial, data =
jprtri3)

Deviance Residuals:
Min 1Q Median 3Q Max
-1.80616 -0.2165508 -0.1267971 -0.07977572 4.069385

(Dispersion Parameter for Binomial family taken to be 1 )

Null Deviance: 8047.795 on 30198 degrees of freedom

Residual Deviance: 6400.237 on 30179.18 degrees of freedom

Number of Local Scoring Iterations: 7

DF for Terms and Chi-squares for Nonparametric Effects

Df Npar Df Npar Chisq P(Chi)
(Intercept) 1
lo(distance) 1 3.1 11.4736 0.0103374