jj
Welcome to the SAS community Simone.
I can't answer your question, but I have a comment about the format.
I reckon that you should protect your identity a bit better.
I would not publish my email address and phone number like this.
Just my (paranoid) 2 cents of course. 🙂
Also, you should format your code when posting it here. There are 2 icons to do that: running man and {i}.
I moved the question to the Statistical Procedures community.
Concur with @ChrisNZ , don't post your email like that, unless you have a strong interest in male enhancement drugs and are looking for a wife from Russia 😉
Or your phone number being on all the calling robots' lists.
Don't help the privacy invaders. Resist.
I reckon you can remove the last line of your signature Kurt, now that your (good) proposal has been mothballed.
I wonder how many Ballot ideas are closed with status IMPLEMENTED? Are there any?
There is a SAS Knowledge Base article about writing contrast statements that involve interactions.
I assume the levels of Migraine are 0 and 1.
What are the levels (and interpretation) of the Age variable?
Please, if you know how to solve it, contact me: simone_derzi@hotmail.com
@mone wrote:
Hello,
I have this code, but I do not know what to do where I have question marks. Can anyone give me a hand? t
proc logistic data=cchs1516study;
class migraine(ref='0') age(ref='0') sex(ref='0') race(ref='0') osa(ref='0') income (ref='1')/param=ref;
model htn=migraine age sex race osa income age*migraine sex*migraine/risklimits;
contrast 'migraine vs no migraine in young people' age ???? age*migraine ??? /estimate=both;
contrast 'migraine vs no migraine in menopause people' age ???? age*migraine ??? /estimate=both;
contrast 'migraine vs no migraine in old people' age ???? age*migraine ??? /estimate=both;contrast 'female vs male in 20-40 group' age ???? sex*migraine ??? /estimate=both;
contrast 'female vs male in 40-60 group' age ???? sex*migraine ??? /estimate=both;
contrast 'female vs male in >60 group' age ???? sex*migraine ??? /estimate=both;
run;
I really appreciate it.
Simone
In my opinion, the whole idea of using a CONTRAST statement is for cases where you are making some unusual linear combination of results, such as -1.3 * level 1 + 3.4 * level2 ... etc., where the coefficients are not +1 or –1 or zero. It is not for the case where you are directly comparing one group to another, all the coefficients are +1 or -1 or zero.
In the case where there are two coefficients that are +1 or -1 and the rest are zero, you can use the LSMEANS command or the SLICE command to obtain the results, and then you don't have the difficulty of figuring out what the proper CONTRAST statement is, because SAS has already done this for you. See the first example at: https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_introcom_sect064.htm&docsetVersio...
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.