According to information from the National Institute on Drug Abuse, research has found that length of treatment is the best predictor of success. At least 90 days are necessary in residential and outpatient programs, and 21 days for inpatient programs. Taking part in a program from at least a year more than doubles the likelihood of staying drug free.
I don't think these facts are based on length of stay, but rather length of treatment, the difference being that treatment may include both a stay in a rehab center plus follow-up programs. There have been a number of studies on length of treatment and effectiveness, but not necessarily length of stay.
Here's one outcome study that might be helpful: http://www.oas.samhsa.gov/systems.htm#SROS
Click Here to search for a treatment center in your state that is right for you.