DOC PREVIEW
PSU STAT 504 - Loglinear Models

This preview shows page 1-2-21-22 out of 22 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Stat 504, Lecture 18 1'&$%More aboutLoglinear ModelsExposure example. Data from Laird and Olivier(1981) on the survival of patients after heart-valvereplacement surgery, with “exposure” measured inpatient-months.Age Type Exposure DeathsUnder 55 Aortic 1,259 4Mitral 2,082 155+ Aortic 1,417 7Mitral 1,647 9Here it makes sense to model the number of deaths yias Poisson(µi), whereµi= exposureiλi,so that λiis death rate per patient-month. Under alog link, we havelog µi= ηi= oi+ xTiβ,where oi= log exposureiis an offset.Stat 504, Lecture 18 2'&$%Consider a saturated model,log λ = β0+ β1X1+ β2X2+ β3X1X2whereX1=1 if under 55,0 if 55+,X2=1 if aortic,0 if mitral.Then the four log-death rates are:log λ1= β0+ β1+ β2+ β3log λ2= β0+ β1log λ3= β0+ β2log λ4= β0It follows thatβ0=logλ4is the log-death rate for the 55+ mitral group,β1= log λ2− log λ4is the effect of age (under 55 minus 55+) whentype=mitral,β2= log λ3− log λ4is the effect of type (aortic − mitral) when age=55+.Stat 504, Lecture 18 3'&$%The interaction term,β3= (log λ1− log λ2) − (log λ3− log λ4),is the effect of type when age=under 55 minus theeffect of type when age=55+.Under a saturated model, we can estimate the meandeath rates directly:ˆλ1=4/1259 = 0.003177ˆλ2=1/2082 = 0.000480ˆλ3=7/1417 = 0.004940ˆλ4=9/1647 = 0.005464Taking the logs giveslogˆλ1= −5.752,logˆλ2= −7.641,logˆλ3= −5.310,logˆλ4= −5.209,from which it follows thatˆβ0= −5.209,ˆβ1= −7.641 + 5.209 = −2.432,ˆβ2= −5.310 + 5.209 = −0.101,Stat 504, Lecture 18 4'&$%andˆβ3= −5.752 + 7.641 + 5.310 − 5.209=1.990.Although the estimates for this saturated model couldbe computed directly, it’s still a good idea to fit themodel using SAS, because then we get SE’s. Wewould fit the model with PROC GENMOD like this:options nocenter nodate nonumber linesize=72;data heart;input age $ type $ exposure y;o = log(exposure);cards;Under55 Aortic 1259 4Under55 Mitral 2082 155+ Aortic 1417 755+ Mitral 1647 9;proc genmod data=heart order=data;class age type;model y = age type age*type / dist=poisson link=log offset=o;run;Notice that we included the log-exposure as an offset.The order=data option in the genmod statement tellsSAS to order the levels of all class variables in thesame order that they appear in the dataset. For eachclass variable, GENMOD creates dummy variables forall levels except the last one (which becomes thereference group).Here’s some relevant portions of the output:Stat 504, Lecture 18 5'&$%Criteria For Assessing Goodness Of FitCriterion DF Value Value/DFDeviance 0 0.0000 .Scaled Deviance 0 0.0000 .Pearson Chi-Square 0 0.0000 .Scaled Pearson X2 0 0.0000 .Log Likelihood 17.9416Analysis Of Parameter EstimatesStandard Wald 95%Parameter DF Estimate Error Confidence LimitsIntercept 1 -5.2095 0.3333 -5.8628 -4.5562age Under55 1 -2.4316 1.0541 -4.4976 -0.3656age 55+ 0 0.0000 0.0000 0.0000 0.0000type Aortic 1 -0.1009 0.5040 -1.0886 0.8868type Mitral 0 0.0000 0.0000 0.0000 0.0000age*type Under55 Aortic 1 1.9902 1.2264 -0.4134 4.3938age*type Under55 Mitral 0 0.0000 0.0000 0.0000 0.0000age*type 55+ Aortic 0 0.0000 0.0000 0.0000 0.0000age*type 55+ Mitral 0 0.0000 0.0000 0.0000 0.0000Scale 0 1.0000 0.0000 1.0000 1.0000Analysis Of Parameter EstimatesChi-Parameter Square Pr > ChiSqIntercept 244.25 <.0001age Under55 5.32 0.0211age 55+ . .type Aortic 0.04 0.8413type Mitral . .age*type Under55 Aortic 2.63 0.1046age*type Under55 Mitral . .age*type 55+ Aortic . .age*type 55+ Mitral . .ScaleNOTE: The scale parameter was held fixed.Stat 504, Lecture 18 6'&$%Notice that SAS reports estimated coefficients of zerofor any dummy variable or interaction correspondingto a reference group; these should be ignored. Theestimated β’s agree with what we found directly.Examining the Wald statistics, we see that:• The main effect of age is significant. Remember,because the model contains an interaction term,the main effect of age is actually the effect of age(under 55 minus 55+) when type=mitral. Thecoefficient of −2.43 means that the death rate forthe younger group is only exp(−2.43) ≈ 0.09 or9% of what it is in the older group whentype=mitral. Looking at it the other way, thedeath rate for the older group is estimated to beexp(2.43) ≈ 11.4 times what it is for the youngergroup, when type=mitral.• The main effect for type is not significant. Thismeans that we have no evidence of an effect ofaortic versus mitral in the older group.Stat 504, Lecture 18 7'&$%What about the interaction? The interaction term isalmost significant at the .10 level, providing someevidence that the effect of valve type (aortic versusmitral) may be different for the two age groups.The effect of aortic versus mitral in the younger groupis β2+ β3, which we estimate to be−.1009 + 1.9902 = 1.889. Because exp(1.889) = 6.61,we estimate that the death rate for aortic valvereplacement is about 6–7 times as high as for mitralvalve replacement among younger patients. Is thiseffect significant? In order to tell, we would need tofind the standard error forˆβ2+ˆβ3. We couldcompute this standard error from the estimatedcovariance matrix,ˆV (ˆβ2)+ˆV (ˆβ3)+2ˆCov(ˆβ2,ˆβ3).Another way to accomplish the same thing is torecode the model so that• the effect of aortic versus mitral when age =under 55 and• the effect of aortic versus mitral when age = 55+both appear as coefficients in the model. This will beon the next homework assignment.Stat 504, Lecture 18 8'&$%Let’s test the null hypothesis that type has no effect,i.e. that aortic versus mitral makes no difference foreither the older group or the younger group. This nullhypothesis corresponds to the reduced model withonly an effect for age,log λ = β0+ β1X1.Let’s fit the reduced model:proc genmod data=heart order=data;class age type;model y = age / dist=poisson link=log offset=o;run;The resulting output:Criteria For Assessing Goodness Of FitCriterion DF Value Value/DFDeviance 2 3.7897 1.8949Scaled Deviance 2 3.7897 1.8949Pearson Chi-Square 2 3.8529 1.9264Scaled Pearson X2 2 3.8529 1.9264Log Likelihood 16.0467Analysis Of Parameter EstimatesStandard Wald 95% Chi-Parameter DF Estimate Error Confidence Limits SquareIntercept 1 -5.2549 0.2500 -5.7449 -4.7649 441.82age Under55 1 -1.2497 0.5123 -2.2539 -0.2455 5.95age 55+ 0 0.0000 0.0000 0.0000 0.0000 .Scale 0 1.0000 0.0000 1.0000 1.0000Stat 504, Lecture 18


View Full Document

PSU STAT 504 - Loglinear Models

Download Loglinear 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 Loglinear 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 Loglinear 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?