Library: | eiv |
See also: | eivknownatt eivknownratue |
Macro: | eivknownvaru | |
Description: | eivknownvaru presents the moment estimates of the parameters in the measurement error models, which has only one variable x. The variance of measurement error sigma_u is known. All of the variables obey normal distributions. See Fuller(1987), section 1.2. |
Usage: | {mux,beta1,beta0,sigmax, sigmae} = eivknownvaru(X,Y,sigmau) | |
Input: | ||
X | n x 1 matrix, the design variables | |
Y | n x 1 matrix, the response | |
sigmau | scalar, the variance of measurement error sigma_u | |
Output: | ||
mux | scalar, the mean value of X | |
beta1 | scalar, the estimate | |
beta0 | scalar, the estimate | |
sigmax | scalar, the estimate of the variance of X | |
sigmae | scalar, the estimate of the variance of error e |
library("eiv") n = 100 randomize(n) x= normal(n)*9 w=x+9*normal(n) Y =0.9+0.8*x+0.01*normal(n) sigmau=81 gest=eivknownvaru(w,Y,sigmau) gest.mux gest.beta1 gest.beta0 gest.sigmax gest.sigmae
gest.mux=-0.93396; gest.beta1=0.88828 gest.beta0=0.41544 gest.sigmax=64.17; gest.sigmae=2.3624
Library: | eiv |
See also: | eivknownatt eivknownratue |