| Library: | eiv |
| See also: | eivknownvaru |
| Macro: | eivknownvarumod | |
| Description: | eivknownvarumod presents modified moment estimates of parameters for 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.The theoretical discussion see section 2.5 of Fuller (1987) page 163-172. |
| Usage: | {mux,beta1,beta0,sigmax, sigmae} =eivknownvarumod(alpha,X,Y,sigmau) | |
| Input: | ||
| alpha | scalar | |
| 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)
alpha=5
sigmau=81
gest=eivknownvarumod(alpha,w,y,sigmau)
gest.mux
gest.beta1
gest.beta0
gest.sigmax
gest.sigmae
gest.mux=-0.93396; gest.beta1=0.83504 gest.beta0=0.36572 gest.sigmax=64.17; gest.sigmae=0.36572
| Library: | eiv |
| See also: | eivknownvaru |