Proportional Odds Modeling
Description
Proportional Odds Modeling
- Present Research Question with a ordinal response and two explanatory variables. The response should be ordinal! One of the explanatory variables ordinal or continuous.
- List variables, along with values/levels
- Test whether effect of ordinal or continuous variable is )near®bsp;with respect to log-odds. Adjust analyses accordingly.
- Perform test of proportional odds assumption with both variables in the model. (We will skip testing for interaction.) (If conclude proportional odds is not appropriate, continue to use proportional odds for the practice here, but when you description of the effects of the covariates in the model that they may not be accurate due to this limitation. In reality, we would dichotomize the response or use another type of modeling.)
- Describe effects of two predictors.
- SAS Code.
You may use either your NHIS Research Question/Data if you want peer feedback or to make some progress on the project or the class survey data for this assignment.
SAMPLE POST:
- Research Question:
Is there a relationship between Number of pairs of shoes with preference for beach or hiking and with time since graduation?
- List variables, along with values/levels:
Response Variable: Number of Pairs of Shoes divided into quartiles. (1= lowest quartile; 4= highest quartile)
Explanatory variables:
Pref = Beach vs. Hiking (excluded other or missing)
Timesince = 1 (<=1 year), 2 (2 years), 3 (3 years), 4.5 (4-5 years), 8 (6-10 years), 12 (>10 years)
Represents Time since graduation from undergraduate.
- Test whether effect of ordinal or continuous variable is )near®bsp;with respect to log-odds. (will adjust analyses accordingly.)
It’s always a great idea to look at graphics!!
Model fit statistics table from model shoes=timesince with time since categorical
Model Fit Statistics
Criterion
Intercept Only
Intercept and
Covariates
AIC
325.887
329.896
SC
334.199
352.062
-2 Log L
319.887
313.896
Model fit statistics table from model shoes=timesince with time since continuous
Model Fit Statistics
Criterion
Intercept Only
Intercept and
Covariates
AIC
325.887
327.753
SC
334.199
338.836
-2 Log L
319.887
319.753
Likelihood ratio test statistic = 319.753 – 313.896 = 5.857 ~ Chi-square with 4.d.f.
(I had 5 observed categories beyond the reference category, hence 5 dummy variables to represent time since and 5 parameters. There was one parameter to represent the effect of timesince when it was considered as continuous. Therefore, d.f.=5-1=4)
p-value=0.21 –> Fail to reject H0. I can consider timesince as continuous according to hypothesis test. HOWEVER, examination of the estimated odds ratios makes me cautious.
I will keep it as categorical but combine upper three categories. (When I do this, new test for linearity results in marginal p-value of 0.072.)
- Perform test of proportional odds assumption with both variables in the model. (We will skip testing for interaction.)
Table:
Score Test for the Proportional
Odds Assumption
Chi-Square
DF
Pr > ChiSq
10.8407
8
0.2109
The evidence suggests that the proportional odds assumption is reasonable for this data (Score Test of Proportional odds p-value=0.21. This is greater than 0.05, indicating we fail to reject the null hypothesis that the proportional odds assumption is correct.)
- Describe effects of two predictors.
Type 3 Analysis of Effects
Effect
DF
Wald
Chi-Square
Pr > ChiSq
timesince_b
3
6.0954
0.1071
Pref
1
4.1018
0.0428
And
Analysis of Maximum Likelihood Estimates
Parameter
DF
Estimate
Standard
Error
Wald
Chi-Square
Pr > ChiSq
Intercept
4
1
-0.8277
0.3341
6.1382
0.0132
Intercept
3
1
-0.0179
0.3251
0.0030
0.9560
Intercept
2
1
1.0564
0.3423
9.5257
0.0020
timesince_b
2
1
-0.0302
0.5614
0.0029
0.9571
timesince_b
3
1
-1.2541
0.5191
5.8373
0.0157
timesince_b
4.5
1
-0.1573
0.4001
0.1545
0.6943
Pref
Beach
1
0.6994
0.3453
4.1018
0.0428
Preference. There is a significant effect of preference for vacation activity (beach vs. hiking, p=0.043), such that the odds of having more shoes are slightly more than twice for those who prefer going to the beach over those who prefer hiking (OR=2.01, 95% CI: 1.02, 3.96).
Time since graduation. Although the overall effect of time since graduation was not significant (p=0.11), there was some suggestion that those who were out for 3 years had lower odds of having more shoes than others those who had been out 1 year or less (OR=0.29, 95% CI: 0.10, 0.79), while those out 2 years or more than 4 years did not have significantly odds of owning more shoes (p=0.96, p=0.69).
SAS Code.
libname class ‘C:UsersstricDocumentsWorkCategorical Data AnalysisCategorical Fall 2020ClassData’;
data class; set class.class_survey; run;
proc contents data=class.class_survey; run;
data new_survey; set class.class_survey;
cat_shoes=1;
if shoes GE 10 then cat_shoes=2;
if shoes GE 15 then cat_shoes=3;
if shoes GE 20 then cat_shoes=4;
if shoes =. then cat_shoes=.;
label cat_shoes=”Quartiles of Numbers of Pairs of Shoes”;
if cat_shoes=1 then lownumbershoes=1; if 2<=cat_shoes<=4 then lownumbershoes=0;
label lownumbershoes=”Low Number Pairs of Shoes”;
if BeachHiking=1 then Pref=’Beach’;
if BeachHiking=2 then Pref=’Hiking’;
nolang=1; if languages=2 then nolang=2; if 5>=languages>=3 then nolang=4;
label nolang=”Number of Languages Spoken”;
if YearsSinceGrad<=1 then timesince=1;
if 2<=YearsSinceGrad<=2 then timesince=2;
if 3<=YearsSinceGrad<=3 then timesince=3;
if 4<=YearsSinceGrad<=5 then timesince=4.5;
if 6<=YearsSinceGrad<=10 then timesince=8;
if YearsSinceGrad>10 then timesince=12;
label timesince=”Years Since Graduation”;
timesince_b=timesince;
if timesince=8 or timesince=12 then timesince_b=4.5;
run;
proc logistic data=new_survey descending;
class Pref timesince(ref=’1′)/param=ref;
model cat_shoes= timesince;
oddsratios timesince;
run;
proc logistic data=new_survey descending;
class Pref /*timesince(ref=’1′)*//param=ref;
model cat_shoes= timesince;
oddsratios timesince;
run;
proc logistic data=new_survey descending;
class Pref timesince_b(ref=’1′)/param=ref;
model cat_shoes= timesince_b;
oddsratios timesince_b;
run;
proc logistic data=new_survey descending;
class Pref /*timesince_b(ref=’1′)*//param=ref;
model cat_shoes= timesince_b;
oddsratios timesince_b;
run;
proc logistic data=new_survey descending;
class Pref timesince_b(ref=’1′)/param=ref;
model cat_shoes= timesince_b Pref;
oddsratios timesince_b;
oddsratios Pref;
run;
Unformatted Attachment Preview
Countries
VacationClimate
BeachHiking
Languages
IceCream
Concentration
Stress
UndergradContacts
OutsideUS
Degrees
Siblings
CatsDogs
CoffeeTea
CupsCoffee
CupsCaffeine
DaysSoda
DaysExercise
MinutesExercise
SocialMedia
Color
YearsSinceGrad
License
Pets
Subscription
Season
HoursSleep
Athletenow
AthleteBefore
BornOutsideUS
Shoes
Eyes
Genre
Age
Bedtime
Activity
SunProtect
Credits
Blood
Restaurants
MaxSpeed
Driver
SummerOl
Sunglasses
Hair
ToCampus
DogLbs
1734026: How many different states in the U.S. have you visited throughout your lif
1734027: How many countries have you visited throughout your life?
1734028: Would you rather spend your vacation in a warm climate or a cold climate
1734029: On your day off would you rather relax at the beach or go hiking?
1734030: How many languages do you speak?
1734031: What is your favorite ice cream flavor?
1734032: What is your concentration?
1734033: How stressed were you on the first day of this semester?
1734034: How many people do you keep in contact with that you met in undergradu
1734035: Have you ever traveled outside of the United States?
1734037: How many educational degrees do you have?
1734038: How many siblings do you have?
1734039: Do you prefer cats or dogs?
1734040: Would you rather drink coffee or tea?
1734036: How many cups of coffee do you drink, on average, per day?
1734347: How many caffeinated drinks, other than coffee, do you drink a day, on av
1734041: How many days a week do you drink soda?
1734042: How many days have you exercised over the last month (30 days)?
1734348: On a typical day, when you do exercise, how many minutes do you exercis
1734052: What is your favorite social media?1734053: What is your favorite color?
1734054: How many years have passed since you graduated undergrad?
1734056: Do you have an active drivers license?
1734057: How many pets do you have?
1734059: What s your favorite subscription service?
1734060: What is your favorite season?
1734061: On average, how many hours of sleep do you get?
1734062: Are you an athlete now?
1734349: Were you an athlete previously?
1734063: Were you born outside the U.S.?
1734065: How many pairs of shoes do you have? (include sneakers, boots, sandals
1982085: What color eyes do you have?
1982087: Which of the following movie genres do you prefer?
1982086: How old are you (in years)?
1982088: What time do you go to bed? (Enter answer as a decimal with hours in u
1982089: How would you categorize your level of activity?
1982090: What kind of sun protection do you use? (to protect your skin)
1982091: How many degree credits have you completed?
1982092: What is your ABO blood type?
1982093: How much did you spend on meals in restaurants last week?
1982094: What is the maximum speed you drive on the highway?
1982095: How do you classify yourself as a driver?
1982096: Which of the following would you prefer to watch during the Summer Oly
1982097: How many pairs of sunglasses do you own?
1982098: How would you categorize your hair color?
1982099: How many minutes does it take you to get to your “home” campus?
1982100: Thinking about your current dog or the most recent dog you have owned,
DogChar
NBeach
MonBeach
FamSize
CellPhone
Capitals
MusicSt
Supermark
Firstjob
Towns
1982101: Thinking about your current dog or the most recent dog you have owned,1982102: How many times do you go to the beach per year?
1982103: Which of the following months would you prefer to go to the beach?
1982104: How would you categorize your family’s size?
1982105: How many cell phones have you owned in your life?
1982106: How many state capitals can you name off the top of your head?
1982107: Which of the following music style do you prefer?
1982108: Which supermarket store do you visit most often?
1982109: How old were you when you got your first job?
1982084: How many cities/towns have you lived in?
cent dog you have owned, which of the following descriptions best describes your dog’s demeanor towards most strangers?
towards most strangers?
Purchase answer to see full
attachment
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."