The histogram is highly left-skewed, basically the same as the one after running proc univariate for hisugbev. Do you think then what I suggested would still be a reasonable idea?
I would simply make sure I have a fair share of uncensored events in each category.
Good luck!
PG
Does anyone know by any chance how to create quantiles with a certain portion of data? I told my professor that creating tertiles would be one way to work with the data I have for hisugbev but another way she suggested was have all the people who have 0 for this variable go in one group and then with the remaining people put them into tertiles. I have never done this before. Thanks!
Why categorize them anyways, why not use the continuous variable?
Making some very broad assumptions here:
hisugbev is probably high sugar beverage consumption, I'll assume weekly.
I would categorize as
0 - no consumption
<7 - less than 1 a day
<14 -less than 2 a day
>=14 2 or more a day
This gives you intuitive data.
The thing about using the continuous form is that you are assuming linearity which may or may not be true in the actual dataset. I modeled hisugbev in tertiles and I see that the difference in parameter estimates shows there is some non-linearity here which you wouldn't see if you modeled hisugbev as a continuous variable. I actually didn't try the categorization you suggested but I will give that a try! You are correct hisugbev is high sugared beverage consumption (servings/week)
What is the cross tab of censor and your new 4 level ranking?
Did you want to include referential coding?
You may also want to point explicitly to data=temp4
proc phreg data=temp4;
class hisugbev4 (ref='0')/param=REF;
model tpyrs*c5_1(0)= age hisugbev4/rl ties=efron;
run;
what happens when you run a proc freq, none of the cells are 0?
proc freq data =temp4;
table hisugbev4*c5_1;
run;
I tried putting in data=temp4 next to the proc phreg statement and ran the model again but nothing different..i get the same output.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.