Econometrics : White Test with R -
good morning,
i trying realize white test on linear model r. don't know how write r codes realize white test.
price : house price, in millions dollars bdrms : number of bedrooms lotsize : size of lot in square feet sqrft : size of house in square feet
the linear model following :
linear model
linearmodel.1 <- lm(price ~ lotsize + lotsize^2 + sqrft + bdrms, data=dataset) summary(linearmodel.1)
breusch-pagan test
library(lmtest) bptest(linearmodel.1, varformula = null, studentize = true, data = dataset)
white test
?????????
thanks answer kind regards,
the white test has been implemented in package "bstats". after installing , loading package, white test performed on linear model object typing
white.test(lm0)
see this page description , example.
Comments
Post a Comment