I am using PROC LOGISTIC and I want to use lsmestimate to estimate OR and 95% CI for some contrasts. I wonder if this is appropriate to prepare an apriori list of contrasts of interest and then use lsmeans and pick up the values in the list and the OR values would be the same as if I was using lsmestimate. By using lsmeans instead of lsmestimate, I want to skip any error when defining the contrasts in lsmestimate. By preparing my list of contrast before running lsmeans, I want to avoid picking the significant differences when I finally see the results table. I appreciate your thoughts on this. Thanks
If you are comparing one level to another, this can be done via LSMEANS, no need for LSMESTIMATE. If you want to compare a linear combination of LSMEANS, where the coefficients of your combination are NOT all 0 or 1 or –1, for example 0.5*(level 1)–0.67*(level 2)+0.33*(Level 3), then you need LSMESTIMATE.
If you are comparing one level to another, this can be done via LSMEANS, no need for LSMESTIMATE. If you want to compare a linear combination of LSMEANS, where the coefficients of your combination are NOT all 0 or 1 or –1, for example 0.5*(level 1)–0.67*(level 2)+0.33*(Level 3), then you need LSMESTIMATE.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.