John, Thanks for the suggestion, but tomorrow I am teaching a little seminar for my department trying to convince people about how wonderful R is. These people are all Stata users, and they really like the idea that they only have to type ", robust" to get het. consistent std. errors.
My pitch to a lot of them has been that R is a great and flexible tool which one doesn't have to be a programming whiz to use. If they have to start writing functions to do something as basic as this, then my colleagues will probably stay in Stata-land. I'm trying to prevent that! Regards, Brian 2006/4/27, John Fox <[EMAIL PROTECTED]>: > Dear Brian, > > How about sqrt(diag(hccm(mod)))? If that's too onerous, then you could > define a function to do it, e.g., > > wse <- function(mod) sqrt(diag(hccm(mod))) > > and then enter wse(mod). If you want a more complete, table-like summary of > the model using White standard errors, then you could easily write a > function to provide that. > > Regards, > John > > -------------------------------- > John Fox > Department of Sociology > McMaster University > Hamilton, Ontario > Canada L8S 4M4 > 905-525-9140x23604 > http://socserv.mcmaster.ca/jfox > -------------------------------- > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Brian Quinif > > Sent: Thursday, April 27, 2006 7:34 PM > > To: [email protected] > > Subject: [R] function for linear regression with White std. errors > > > > I would like to know if there is a function that will run a > > linear regression and report the White (heteroscedasticity > > consistent) std. > > errors. > > > > I've found the hccm() function in the car library, but that > > just gives me the White covariance matrix. I'd like to be > > able to see the White std. errors without having to do much > > more work, if possible. > > > > Thanks, > > > > Brian > > > > ______________________________________________ > > [email protected] mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html > > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
