turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- GAM without a strange non-linear component

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-15-2015 08:24 AM

I submitted proc gam with a non-linear component which has no information on deviation analysis (table on smoothing model analysis), but for DF only. How can I interpret these results ?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-16-2015 08:24 AM

It would help if you could share the results with the forum, as well as the design and model that you are using.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-16-2015 08:39 AM

Program is

proc gam data=modelo2;

class viv act iess prov gen civil edu trab;

model tipo (event='1')=spline(deuda_6m)

param(viv)param(act)param(iess)param(prov)

param(gen)param(civil)param(edu)param(trab)

/ dist=binomial link=logit maxiter=10000 maxitscore=200000;

output out=result pred linp uclm lclm adiag std;

score data=result out=result;

run;

I tried to attach the file sas modelo2, but I was not able. I can send it by email.

Table of deviance analysis gives no result, excepting DF. Why ?

I found that if the anodev=norefit is included among the options of the sentence model, then a result for this table is obtained.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-16-2015 08:58 AM

Give this a try:

```
proc gam data=modelo2;
class viv act iess prov gen civil edu trab;
model tipo (event='1')=spline(deuda_6m)
param(viv act iess prov gen civil edu trab)
/ dist=binomial link=logit maxiter=10000 maxitscore=200000 anodev=norefit;
output out=result pred linp uclm lclm adiag std;
score data=result out=result;
run;
```

I don't know whether changing how the class variables enter the model will help or not, but this looks to be "cleaner" code. Since there is only one smoothing term in the model, the norefit method is probably more appropriate than fitting nested models.

The other cause of loss of estimates is an overfitted model, but I don't think that is necessarily the case here. How many events and nonevents do you have in your data?

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-16-2015 09:08 AM

Yes, the code works OK, excepting the deviance analysis.

There are 1815 events and 742 nonevents.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-16-2015 09:17 AM

I assume that each of your class variables has only two levels, so you have about 10 events per variable. Overfitting doesn't seem to be the problem then. I will suppose that the behavior is due to having only a single nonparametric term.

And given that, have you considered fitting the following, since the class variables enter parametrically?

```
proc glimmix data=modelo2;
class viv act iess prov gen civil edu trab;
effect deu_spl = spline(deuda_6m);
model tipo (event='1')=deu_spl viv act iess prov en civil edu trab
/ dist=binomial link=logit maxiter=10000 maxitscore=200000 solution;
run;
```

Check if this runs for your data, and whether there is an ANOVA table and solution estimates.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-16-2015 09:23 AM

Building on Steve's response, PROC LOGISTIC also supports the EFFECT statement. Since your model does not have random effects, I'd try LOGISTIC if you decide to pursue this alternative.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-16-2015 09:38 AM

Most of variables has two levels.

It seems that SAS discretizes deu_spl (it appeared 7 levels), if it does, how are built those levels ?

Also, now there are results for Type III Tests of Fixed Effects.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-16-2015 09:52 AM

Well, those 7 levels are the knots for the spline. You can specify other values in the effect statement, but that should work. Also, @Rick_SAS suggested PROC LOGISTIC as also supporting the EFFECT statement, so you may want to port to that, especially if you are interested in scoring.

Steve Denham