Hi group: I have a data set, which has severe colinearity problem. While running linear regression in R and SPSS, I got different models. I am wondering if somebody knows how to make the two software output the same results. (I guess the way R and SPSS handling singularity is different, which leads to different models.) Thanks. [[alternative HTML version deleted]]
I think we'll need some output to know so we can see the differences. (And data and code would be useful too, if you could provide a small example). One thought is that the programs might remove a variable that is completely collinear, but the different programs might remove different variables - so check that the same variables have been removed. Jeremy On 6 November 2012 13:39, Hui Du <Hui.Du@dataventures.com> wrote:> Hi group: > > > I have a data set, which has severe colinearity problem. While running > linear regression in R and SPSS, I got different models. I am wondering if > somebody knows how to make the two software output the same results. (I > guess the way R and SPSS handling singularity is different, which leads to > different models.) > > > Thanks. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Jeremy Miles <jeremy.miles <at> gmail.com> writes:> > I think we'll need some output to know so we can see the differences. (And > data and code would be useful too, if you could provide a small example).Definitely.> > One thought is that the programs might remove a variable that is completely > collinear, but the different programs might remove different variables - so > check that the same variables have been removed. > > Jeremy >Furthermore, with severely collinear models, small numerical differences can make a big difference, either in which variables you choose to remove (e.g. if the variance inflation factors come out as (9.999,10.001) for variables 1 and 2 in one package, but (10.001,9.999) in the other, or in the actual linear algebra (based on technical details of linear algebra and floating-point computations)> On 6 November 2012 13:39, Hui Du <Hui.Du <at> dataventures.com> wrote: > > > Hi group: > > > > > > I have a data set, which has severe colinearity problem. While running > > linear regression in R and SPSS, I got different models. I am wondering if > > somebody knows how to make the two software output the same results. (I > > guess the way R and SPSS handling singularity is different, which leads to > > different models.)