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 ?
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
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.
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
Yes, the code works OK, excepting the deviance analysis.
There are 1815 events and 742 nonevents.
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
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.
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.
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
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.