Hi
I would appreciate it if you could answer my question quickly.
I want to see the dietary iron among case (patient) and control (healthy). The variable for disease is risk factor. I want to adjust sex, alcohol (yes/no), drug (yes/no), and BMI. Is this the correct code?
proc glm data=SS;
class risk factor sex alcohol drugs;
model Iron= risk factor sex alcohol drugs BMI_A / solution;
lsmeans risk factor/ stderr pdiff cov out=adjmeans;
run;
@Manije72 wrote:
Hi
I would appreciate it if you could answer my question quickly.
I want to see the dietary iron among case (patient) and control (healthy). The variable for disease is risk factor. I want to adjust sex, alcohol (yes/no), drug (yes/no), and BMI. Is this the correct code?
proc glm data=SS;
class risk factor sex alcohol drugs;
model Iron= risk factor sex alcohol drugs BMI_A / solution;
lsmeans risk factor/ stderr pdiff cov out=adjmeans;
run;
If you want to compare the dietary iron between case and control, this is a categorical variable which I do not see in your model.
Also "risk factor" is not a valid variable name in SAS, so it can't be used like that (although risk_factor is a valid variable name).
Hi
Thank you for your response.
I named "patients/healthy) as "risk factor" in my data. It has 0(healthy) and 1(patients) code.
Hi,
Thank you for your response.
I named case/control group "risk_factor" in my data. It has 0(control) and 1(case) codes.
I used "risk_factor" in SAS.
When you have a variable name in your data such as risk_factor, please use that variable name in your text as well, possibly with other descriptions. Do not make us guess what variable you are referring to.
With that understanding, your code looks reasonable to me.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.