i have a linear regression model:
yi = α + βxi + ui
and I want to compute:
(\sigma_u)^2(X'X)^(-1)
Can I do that in gretl and how? If not, how to get the X matrix out of gretl?
I really appreciate your reply!!!
i have a linear regression model:
yi = α + βxi + ui
and I want to compute:
(\sigma_u)^2(X'X)^(-1)
Can I do that in gretl and how? If not, how to get the X matrix out of gretl?
I really appreciate your reply!!!
dickoa: I supposse your response wanted to be:
open galton
list xlist = const parent # or list xlist 0 1 2
matrix X = {xlist}
ols child const parent --quiet
scalar sigma_u = $sigma
matrix res = sigma_u^2 * inv(X'X)
res
In any case, it is even an easier way to do this:
open galton
list xlist = const parent # or list xlist 0 1 2
matrix X = {xlist}
ols child const parent --quiet
matrix res = $vcv
res
Here is one approach. If you want to learn more I urge you to read the chapter 13 of the gretl guide.