Library: | eiv |
See also: | eivnonlinearinstr |
Macro: | eivlinearinstr | |
Description: | eivlinearinstr presents the moment estimates of the regression coefficients in the measurement error model with single predictor, which has an instrumental variable W. All of the variables obey normal distributions. All parameters are estimated by moment method in measurement error models. Details see Fuller(1987), page 50-53. |
Usage: | {beta1,beta0} = eivlinearinstr(X,W,Y) | |
Input: | ||
X | n x 1 matrix, the design variables | |
W | n x 1 matrix, the instrumental variables | |
Y | n x 1 matrix, the response | |
Output: | ||
beta1 | scalar, the estimate | |
beta0 | scalar, the estimate |
library("eiv") n=100 randomize(n) V=uniform(n,3).*#(4,3,4)'+#(3,3,3)' Y=V[,1] X=V[,2] W=V[,3] gest=eivlinearinstr(X,W,Y) gest.beta1 gest.beta0
gest.beta1=-1.1709; gest.beta0=10.135
Library: | eiv |
See also: | eivnonlinearinstr |