Test all coefficients equal to 0 with systemfit R package

You might use the package systemfit to estimate simultaneous equations[1]. Systemfit does not explain how to test null coefficients together. The solution is simple. You juste have to compute a diagonal matrix of the dimension equals to the number of coefficients:

n = nrow(as.matrix(fit$coefficients))
Rmat <- matrix(0, nrow = n, ncol = n) for (i in 1:n){ Rmat[i,i]=1} linearHypothesis(fit,Rmat)

You replace the variable "fit" by the variable corresponding to your systemfit output. And there you are, you can get the results of your F test.

[1] You can refer as well to the vignettes to get a detailed explanation.

Hits: 171

Add Comment

Required fields are marked *. Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.