BookmarkSubscribeRSS Feed
yahoo0806
Calcite | Level 5

Dear all,

I am about to write a SAS code for an ANCOVA model with change from baseline as dependent variable, treatment as an independent variable and study baseline as well as treatment-by-study baseline interaction as covariate.

 

However I am stuck with the sentence below:

 

An overall estimate of the mean change across the treatment groups will also be provided with sample size for each treatment group as the weight.

 

I am planning to use either proc mixed or proc glm. Can anyone let me know if you understand the sentence above and provide your suggestion on how I should write my SAS code for the model?

3 REPLIES 3
PaigeMiller
Diamond | Level 26

@yahoo0806 wrote:

An overall estimate of the mean change across the treatment groups will also be provided with sample size for each treatment group as the weight.

 


This is not phrased as a question, it is just a statement.It has no context and it's not clear how this statement applies to anything else you have described. Is it a requirement that the analysis must meet? What is the context of this statement?

 

But even in the case where it is a requirement, I just don't udnerstand it. "Weight"? Weights are inputs, estimate of mean change are outputs, it doesn't have the right look and feel.

--
Paige Miller
yahoo0806
Calcite | Level 5

Hi,

That statement is trying to say the analysis to obtain the overall estimate of the mean change across the treatment groups should be performed. and this analysis should adjust for the weight using sample size of each treatment group.

 

This is how I understand it....

 

I found a statement in proc glm as weight, I am thinking if I should use that statement to put the sample size of each treatment group as the weight: 

proc glm;

.....

weight n;

run;

 

However, I couldn't make myself understand the question, i.e, how can I get an overall estimate of the mean change across all treatment groups....as what I know, if I use lsmeans, lsmeans will give me the estimate for each treatment group, it will never give me an overall estimate.....

 

is this helpful?

PaigeMiller
Diamond | Level 26

The sample size is just an output of the analysis. If it is a weight, it is an input. You don't put the sample size in the WEIGHT statement in PROC GLM or PROC MIXED.

 

"Mean change over all treatment groups" could simply be the mean of each treatment group, or the difference between the means of two treatment groups. But yes, I agree it is vague.

--
Paige Miller

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 3 replies
  • 1525 views
  • 0 likes
  • 2 in conversation