PSU STAT 504 - Polytomous Regression Models

Unformatted text preview:

1 Stat 504 Lecture 22 Model Selection Last time we t a model to the now famous alligator food choice dataset Primary Food Choice Lake Sex Size Hancock M small large 4 0 0 1 2 F small 16 3 2 2 3 large 3 0 1 2 3 M F Trafford M George Fish Inv Rept Bird Other 7 1 0 0 5 1 prob of sh 2 prob of invertebrates 3 prob of reptiles 4 prob of birds 5 prob of other and made sh be the baseline category The logit equations were j log 0 1 X1 1 small 2 2 0 0 1 large 13 7 6 0 0 small 3 9 1 0 2 large 0 1 0 1 0 three dummy indicators for lake a dummy for sex and small 3 7 1 0 1 large 8 6 6 3 5 small 2 4 1 1 4 large 0 1 0 0 0 M small 13 10 0 2 2 large 9 0 0 1 2 F small 3 9 1 0 1 large 8 1 0 0 1 F We let More on Polytomous Regression Models Oklawaha 2 Stat 504 Lecture 22 Stat 504 Lecture 22 for j 2 3 4 5 The X s included a dummy for size Therefore each logit equation had six coe cients to be estimated so the number of free parameters in this model was 4 6 24 3 4 Stat 504 Lecture 22 We found that options nocenter nodate nonumber linesize 72 data gator input lake sex size food count cards Hancock male small fish 7 lines omitted George female large other 1 lake was highly signi cant Wald chisquare 36 2 df 12 size was highly signi cant Wald chisquare 15 9 df 3 proc logist data gator freq count class lake size sex order data param ref ref first model food ref fish link glogit aggregate scale none run sex was not signi cant Wald chisquare 2 2 df 3 Wald statistics might not be as accurate as deviance tests Let s adopt an analysis of deviance approach to compare various models The t statistics are Model Convergence Status First let s nd the deviance G2 for the null intercept only model a model with just four parameters Because there are N 4 2 2 16 unique covariate patterns the saturated model will have 16 5 1 64 free parameters so the G2 statistic for the null model should have 64 4 60 degrees of freedom Let s t the null model in PROC LOGISTIC like this Convergence criterion GCONV 1E 8 satisfied 2 Log L 604 3629 Deviance and Pearson Goodness of Fit Statistics Criterion DF Value Value DF Pr ChiSq Deviance Pearson 0 0 0 0000 0 0000 Number of unique profiles 1 5 Stat 504 Lecture 22 6 Stat 504 Lecture 22 Repeating the model tting for various sets of predictors we obtain the following analysis of deviance table What happened By default the aggregate option calculates goodness of t statistics for a table that aggregates over the unique patterns for the covariates appearing in the model In this case there are no covariates in the model so there is only one unique pro le and the intercept only model is considered to be saturated G2 Model Saturated We want SAS to compute the t statistics relative to a saturated model that estimates the response probabilities independently for each combination of lake sex and size To do that we change the model statement like this 0 00 0 Lake Size Lake Size 35 40 32 Lake Size Sex 50 26 40 Lake Size 52 48 44 Lake 73 57 48 Size 101 61 56 Sex 114 66 56 Null 116 76 60 proc logist data gator freq count class lake size sex order data param ref ref first model food ref fish link glogit aggregate lake size sex scale none run df Note did not converge We ran into trouble when we included the lake size interaction Here are some relevant portions of the output Now the results are Model Convergence Status Quasi complete separation of data points detected Deviance and Pearson Goodness of Fit Statistics Criterion DF Value Value DF Pr ChiSq Deviance Pearson 60 60 116 7611 106 4922 1 9460 1 7749 0001 0 0002 WARNING The maximum likelihood estimate may not exist WARNING The LOGISTIC procedure continues in spite of the above warning Results shown are based on the last maximum likelihood iteration Validity of the model fit is questionable Number of unique profiles 16 7 Stat 504 Lecture 22 Criterion DF Value Value DF Pr ChiSq Deviance Pearson 32 32 35 3989 38 2807 1 1062 1 1963 0 3109 0 2058 Model Fit Statistics Intercept Only Intercept and Covariates 612 363 625 919 604 363 587 001 695 451 523 001 AIC SC 2 Log L Testing Global Null Hypothesis BETA 0 Test Likelihood Ratio Score Wald Chi Square DF Pr ChiSq 81 3622 73 0595 44 1606 28 28 28 0001 0001 0 0268 Type III Analysis of Effects Effect DF Wald Chi Square Pr ChiSq lake 12 18 6397 size 4 2 8868 lake size 12 6 2811 WARNING The validity of the model fit 8 Stat 504 Lecture 22 Analysis of Maximum Likelihood Estimates Number of unique profiles 16 Criterion Deviance and Pearson Goodness of Fit Statistics 0 0976 0 5769 0 9013 is questionable Parameter food Intercept Intercept Intercept Intercept lake lake lake lake lake lake lake lake lake lake lake lake size size size size lake size lake size lake size lake size lake size lake size lake size lake size lake size lake size lake size lake size bird invert other reptile bird invert other reptile bird invert other reptile bird invert other reptile bird invert other reptile bird invert other reptile bird invert other reptile bird invert other reptile Oklawaha Oklawaha Oklawaha Oklawaha Trafford Trafford Trafford Trafford George George George George large large large large Oklawaha Oklawaha Oklawaha Oklawaha Trafford Trafford Trafford Trafford George George George George large large large large large large large large large large large large DF Estimate Standard Error Wald Chi Square 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 4423 1 7492 1 0561 2 4423 10 2353 2 5377 0 5452 0 8329 0 8329 2 5377 1 0561 1 5261 0 3629 1 9211 0 6179 0 3302 1 5950 10 2786 0 7196 0 4964 8 5176 9 0046 12 6194 0 3398 0 9664 9 3566 1 1896 0 1322 2 3488 7 2735 0 7802 11 1988 0 7372 0 5417 0 4105 0 7372 253 2 0 7645 0 8377 1 3204 1 3204 0 7645 0 7540 1 1151 1 0517 0 6392 0 7512 1 2673 1 0098 154 6 0 7151 1 2986 253 2 154 6 137 4 1 7692 1 6365 154 6 1 1119 1 6365 1 6251 154 6 1 1399 204 6 10 9757 …


View Full Document

PSU STAT 504 - Polytomous Regression Models

Download Polytomous Regression Models
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Polytomous Regression Models and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Polytomous Regression Models 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?