BookmarkSubscribeRSS Feed
CptPrice
Fluorite | Level 6

Hello everyone, I have 2 categorical predictor and 1 continious covariate measurements for a kind of parasites weight in grams and I converted it to counts so I'll be able to interpret 1 unit parasites effect on life span and mortality. Parasites were measured as weekly and deaths were examined as daily. Every cell has its own amount of parasite and so every each animal too. As I assess weekly measurments I can calculate daily amount of parasites, so its a daily varying covariate.

 

Life span is right censored and death is binomial. And I have to interpret that covariates quantitative effect on life span as ''1 unit increase in parasite and x unit decrease in days''. How can I do that?

7 REPLIES 7
CptPrice
Fluorite | Level 6

I am still trying to constitute an appropriate and accurate statement list given my purpose.

But it's:

 

PROC PHREG;
model age*dead(0)=kul kat Nparasite(kul);
array parasite{35} P8-P42;
IF age < 12 then Nparasite=0;
run;

 

and log result is ''ERROR: Nesting of continuous variable not allowed.''.

Rick_SAS
SAS Super FREQ

You have not used a CLASS variable, so all numeric explanatory variables are treated as continuous. As the ERROR says: You can't nest continuous effects. Here is the SAS documentation that discusses nested effects and how they are interpreted.

 

1. Are you treating Nparasite as continuous or discrete? If discrete, put NParasite in a CLASS statement.

2. Usually the variable inside the parentheses (kul, in your example) is discrete. If that is the case here, put kul in a CLASS statement. 

 

I don't think the ARRAY statement is doing anything, but perhaps you are showing only partial code. Personally, I would put the IF-THEN statement into a DATA step, but that is a personal preference.

CptPrice
Fluorite | Level 6
What a mistake! I forgot to write CLASS statement, sorry.
CptPrice
Fluorite | Level 6

Nparasite is a continuous covariate, not discrete. I just followed the "Example 89.7 Time-Dependent Repeated Measurements of a Covariate" and all I want to interpret the effect of one unit parasite on lifespan or survivability. This is new statement:

PROC PHREG;
class kul kat;
model yas*olum(0)=kul kat Nparasite;
array parasite{35} P8-P42;
IF yas < 12 then Nparasite=0;
run;

and the result is:

Rick_SAS
SAS Super FREQ

Your parameter estimate for the Nparasite variable is 0 with a missing value for the standard error. This often indicates that the variable is constant. You can check the range of the Nparasite variables by using PROC MEANS:

proc means data=Have;
var Nparasite;
run;

Your estimates for the kul and kat variables also look strange. I suggest that you check your data. Make sure that when you created it or imported it into SAS, you ended up with a valid SAS data set. 

If possible, post your data here.

CptPrice
Fluorite | Level 6

Thank you for your attention. There are 4 control groups and 4 parasite groups. Actually, I have to compare these groups as 4vs4. Not just for PROC PHREG, how can I interpret absolute effect of parasite on mortality with repeated measurments?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1361 views
  • 3 likes
  • 2 in conversation