Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: stepwise regression coefficients change each time the program is run
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: stepwise regression coefficients change each time the program is run
Date
Wed, 21 Sep 2011 15:15:48 +0100
I don't understand the role of random sampling here. Presumably you
are implying that you are repeatedly using the same random sample, as
otherwise the differences between different samples would seem
adequate explanation of different regression results. However, if so,
why you are re-doing what you think is exactly the same analysis?
That aside, your understanding is that -merge- is causing you
problems. I think you are best advised to email Stata tech support
with details on your Stata and datasets and evidence of lack of
reproducibility of -merge-.
Also, the implication is that something happened six months ago, but
you don't give any details. If it's that your Stata got corrupted
somehow, then re-installing is one possibility.
On Wed, Sep 21, 2011 at 2:07 PM, Nina Joyce <[email protected]> wrote:
> Hi,
> I have been having this problem for about six months now. Here's the
> background: I have a dataset with patient information that I link to a
> dataset with physician information. So it is a many-to-one merge.
> There are about 50K patients and 40 physicians. After they are
> merged, I do a bunch of data cleaning and variable creation and then
> draw a random sample of 50% to derive the model. I use a stepwise
> regression (i know, i hate it too). Here's the problem: If I merge
> the datasets, do all the data cleaning and then run the stepwise
> regression, I get a different model every time. However, if I merge
> the datasets, save it, close it down and then reopen it before doing
> the data cleaning and drawing the sample, as long as I use that same
> dataset I get the same model every time. Which means that it has to be
> something that happens before I save the dataset, and the only thing
> that I do before saving is the merge.
> thanks so much for any suggestions.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/