[R] Hausman test in R

Bert Gunter gunter.berton at gene.com
Sun Oct 28 23:40:56 CET 2012


1. These are primarily statistics issues, not R issues. You should
post on a statistical help list like stats.stackexchange.com, not
here.

2. However, given your acknowledged statistical ignorance, you may be
asking for trouble. I suggest you seek help from a local statistical
expert to get you started. Then, depending on your statistical
background, you may understand enough to drive safely on your own.

Also try at the R command prompt:

install.packages("fortunes")
library(fortunes)
fortune("brain surgery")

Cheers,
 Bert



On Sun, Oct 28, 2012 at 1:33 PM, fxen3k <f.sehardt at gmail.com> wrote:
> Hi there,
>
> I am really new to statistics in R and statistics itself as well.
> My situation: I ran a lot of OLS regressions with different independent
> variables. (using the lm() function).
> After having done that, I know there is endogeneity due to omitted
> variables. (or perhaps due to any other reasons).
> And here comes the Hausman test. I know this test is used to identify
> endogeneity.
> But what I am not sure about is: "Can I use the Hausman test in a simple OLS
> regression or is it only possible in a 2SLS regression model?" "And if it is
> possible to use it, how can I do it?"
>
> Info about the data:
>
> data = lots of data :)
>
> x1 <- data$x1
> x2 <- data$x2
> x3 <- data$x3
> x4 <- data$x4
> y1 <- data$y1
>
> reg1 <- summary(lm(y1 ~ x1 + x2 + x3 + x4))
>
> Thanks in advance for any support!
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Hausman-test-in-R-tp4647716.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm




More information about the R-help mailing list