If you are a SPSS, SAS, or Stata user who finds yourself needing to use R (I mean, it’s free), I just found this great website: http://statmethods.net/index.html.
If you are a SPSS, SAS, or Stata user who finds yourself needing to use R (I mean, it’s free), I just found this great website: http://statmethods.net/index.html.
If you’ve ever been puzzled by odds ratios in a logistic regression that seem backward, stop banging your head on the desk.
Odds are (pun intended) you ran your analysis in SAS Proc Logistic.
Proc logistic has a strange (I couldn’t say odd again) little default. If your dependent variable Y is coded 0 and 1, SAS will model the probability of Y=0. Most of us are trying to model the probability that Y=1. So, yes, your results ARE backward, but only because SAS is testing a hypothesis opposite yours.
Luckily, SAS made the solution easy. Simply add the ‘Descending’ option right in the proc logisitic command line. For example:
PROC LOGISTIC DESCENDING;
MODEL Y = X1 X2;
RUN;
All of your parameter estimates (B) will reverse signs, although p-values will not be affected.
[Logistic_Regression_Workshop]
In addition to the five listed in this title, there are quite a few other options, so how do you choose which statistical software to use?
The default is to use whatever software they used in your statistics class–at least you know the basics.
And this might turn out pretty well, but chances are it will fail you at some point. Many times the stat package used in a class is chosen for its shallow learning curve, (more…)
A great article for specifying Mixed Models in SAS:
Mixed up Mixed Models
by Robert Harner & P.M. Simpson
Anyone doing mixed modeling in SAS should read this paper, originally presented at SUGI: SAS Users Group International conference. It compares the output from Proc Mixed and Proc GLM when specified different ways. There are some subtle distinctions in the meaning of the defaults in the Repeated and Random statements, and this paper does an excellent job of clarifying them.
With SAS, it’s almost always the semicolons!
I read that recently–I can’t remember where now (if you wrote it, let me know–I’ll link!).
I spent the day at Cornell doing SAS programming; I kept expecting Andy Bernard to show up.
Anyway, I was reminded of that quote because, as you guessed it, it was almost always that I forgot a semicolon when I got a SAS error. The errors never mention a semicolon, but that is always the first thing to check for.
I was also reminded today that another common mistake is to forget the SET statement when creating a new data set. If SAS tells you your variables don’t exist, but you know they do, it’s because you forgot the SET statement.
I was also reminded of my best SAS time saver ever. F12: output;cle;log;cle;wpgm. At first I set it up wrong and was lost for a few minutes without it. Luckily I discovered my mistake pretty quickly.