Displaying 1 result from an estimated 1 matches for "rvchisq".
Did you mean:
rchisq
2007 Aug 20
1
rv package, rvnorm function
...near model by OLS
sigma.hat <- sqrt(deviance(testlm)/df.residual(testlm))
# deviance(testlm) is equivalent to sum(residuals(testlm)^2)
beta.hat <- coefficients(testlm)
V.beta <- vcov(testlm)/(sigma.hat^2) # unscaled covariance matrix
n <- 10
library(rv)
sigma <- sigma.hat*sqrt((n-2)/rvchisq(df=n-2)) # default number of
simulations
# is 1000
beta <- rvnorm(mean=beta.hat, var=V.beta*sigma^2)
****R file ends here *********************
Best regards,
John
--
John P. Burkett
Department of Environmental and Natural Resource Economics
and Department of Economics
University of Rhode Isl...