BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Uvanpriya
Calcite | Level 5

I have obtained the type I sum of squares corresponding to the variables in a ZIP model under genmod procedure  and i am confused as to how SAS calculates the type I sum of squares for the 2 model statements.( MODEL AND ZEROMODEL STATEMENTS)Capture.PNG

can someone explain why twice the log likelihood value is same for the variable g in both the models?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

I am not an expert in ZIP Models, but it seems like you can answer this question yourself by using an experiment. Merely change the order of the variables on the MODEL statement and see if the values in the Type1Zero table change.

 

When I do the experiment I find the following:
1. If I change the order of the variables on the MODEL statement. the values in the Type1Zero table do not change.

2. Similarly, if I change the order of the variables on the ZEROMODEL statement, the values in the Type1 table do not change.

 

You can do a second experiment: Change the model or zero-model and see how it affects the tables.

3. If I change the variables used on the MODEL statement. the values in the Type1Zero table change.

2. Similarly, if I change the variables used on the ZEROMODEL statement, the values in the Type1 table change.

 

I think this answers your question.

View solution in original post

7 REPLIES 7
StatDave
SAS Super FREQ
It is the last variable added to the model, so this single type 1 value is its effect to the overall model - adjusted for all other variables in the model.
Uvanpriya
Calcite | Level 5

what do you mean by the overall model? Are you referring to both the model statement and the zeromodel statement?

so let's consider the variable 'a' defined under the MODEL statement. so then if we calculate the type I sum of squares corresponding to the variable 'a' under the MODEL statement does it make adjustments for all the variables x1,x2,x3,x4,x5,x6,x7 and z1,z2,z3,a or does it make adjustments only for the variables x1,x2,x3,x4,x5,x6,x7?

PGStats
Opal | Level 21

These are log-likelihood type 1 analyses, describing the log-likelihood improvement as each parameter is added to the model. The Chi-square p-values describe the improvements as significant or not. So, when parameter a is lastly introduced in the model fit, the improvement is evaluated after the other parameters are taken into account.

The tables above would indicate that the inclusion of parameter a does not improve significantly the model fit.

PG
Uvanpriya
Calcite | Level 5

yes i do understand how to interpret the results. Here what i want to know is the procedure which is happening inside. For an example under the zeromodel statement i have defined the variables in the order z1,z2,z3,a. so then if i calculate the type I sum of squares when the variable 'a' is added to the zeromodel statement does it make adjustments only for the variables defined under the zeromodel statement(z1,z2,z3) or does it make adjustments for the variables defined under the model statement as well(x1,x2,x3,x4,x5,x6,x7,a)?

Rick_SAS
SAS Super FREQ

I am not an expert in ZIP Models, but it seems like you can answer this question yourself by using an experiment. Merely change the order of the variables on the MODEL statement and see if the values in the Type1Zero table change.

 

When I do the experiment I find the following:
1. If I change the order of the variables on the MODEL statement. the values in the Type1Zero table do not change.

2. Similarly, if I change the order of the variables on the ZEROMODEL statement, the values in the Type1 table do not change.

 

You can do a second experiment: Change the model or zero-model and see how it affects the tables.

3. If I change the variables used on the MODEL statement. the values in the Type1Zero table change.

2. Similarly, if I change the variables used on the ZEROMODEL statement, the values in the Type1 table change.

 

I think this answers your question.

Uvanpriya
Calcite | Level 5

Thanks for your answer. I actually have figured out this today by following a similar approach to your second experiment.

MichaelL_SAS
SAS Employee

The procedure is performing two series of tests, that as @PGStats said are based on likelihood ratio statistics. The Type1 table shows the results for adding effects to the mean model, (using the full zero inflated model), and the Type1Zero table shows the results for adding effects to the zero inflated model (using the full mean model). The 2*LogLikelihood values are the same in the final row of each table, because in both cases it is based on the likelihood when all the effects in the mean model and all the effects in the zero inflated model are used.

 

To your original question, the 2*LogLikelihood values are the same in the tables for the effect “a” because it was the last effect you specified in both the MODEL and ZEROMODEL statements, so it corresponds to the last row of both tables.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

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.

Discussion stats
  • 7 replies
  • 1080 views
  • 1 like
  • 5 in conversation