BookmarkSubscribeRSS Feed
JessicaM
Calcite | Level 5

Hi everyone!

I have a data set from cows (n = 66) sampled in two different days (7 and 14) and they were in two different treatments (High P4 and Low P4). I analyzed the samples for gene expression. I've been trying to run a mixed linear regression model using PROC MIXED to evaluate the effect of treatment (categorical), day (categorical), duration (continuous) as well as its possible interactions on the expression of a gene (ACSL3). I would like to have the estimates for the effect of duration (fixed effect) on the expression of ACSL3 (dependent variable) per day as well as per treatment (both fixed effects). I've done before using LSMEANS to estimate the effect of treatment*day because they are categorical variables but I can't use LSMEANS for continuous variables (case of the variable duration). I've tried the estimate statement as well as contrasts and macros but I can't get the code right - I don't think I know stats in a high level to understand how to code for those. I am wondering is someone could share any info that could help me? Please see below my current code, thank you so much!

PROC MIXED DATA=endometrium_cows_all;
where repeated = 0;
CLASS treatment cow_id day ;
MODEL ACSL3= treatment | duration | day  / htype=3 residual;
REPEATED/ type=cs SUB=cow_id;
LSMEANS treatment day treatment*day/ DIFF;
estimate 'estimate for duration' duration 1;
run;

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 849 views
  • 0 likes
  • 1 in conversation