Library: | eiv |
See also: | eivlinearinstr |
Quantlet: | eivlinearinstrvec | |
Description: | eivlinearinstrvec handle vector-explanatory variable model, which extends the results given by eivlinearinstr. The calculating results are based on moment methods. |
Usage: | beta = eivlinearinstrvec(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: | ||
beta | vector, the estimate |
library("xplore") library("eiv") n=100 randomize(n) x=floor(uniform(n,3)*6+#(4,5,5)') w=floor(uniform(n,4)*8+#(3,3,2,2)') y=floor(uniform(n)*9+2) gest=eivlinearinstrvec(x,w,y) gest
Contents of gest [1,] 0.19413 [2,] 0.24876 [3,] 0.37562