Hi,
I am trying to run a multiple imputation to correct for measurement error. Using "Int J Epidemiol. 2006 Aug;35(4):1074-81.Multiple-imputation for measurement-error correction.
Cole SR1, Chu H, Greenland S paper" for guidance, I first ran a linear regression of my validated exposure measurements on the mismeasured exposure.
regress X (blood levels of a toxin) = a + b(mismeasured sweat levels of a toxin)
I save the outcomes for the beta coefficients and variances as matrices next.
matrix beta = e(b)
matrix var = e(V)
matrix list beta
beta[1,2]
b _cons
y1 .76620142 .57014411
matrix list var
symmetric var[2,2]
b _cons
b .00131926
_cons -.00323015 .00828289
The next step is to generate new beta coefficients by including a component of variation, drawn from a multivariate normal distribution with mean(beta) cov(var)
clear
set obs 100
number of observations (_N) was 0, now 100
drawnorm w x y cons, n(100) cov(var) means(beta)
However when I try running this, it comes up as a conformability error. I am not sure what I am doing wrong. I would be really grateful for any thoughts.
Thanks,
Io
Related Posts with Question about conformability: multiple imputation for measurement error
Incorrect margins/pred. probabilities after ivprobit - instrument should be ignored?Hello, I am using the ivprobit command and want to calculate predicted probabilities with the margi…
Using matrix as lookup tableHello, I have two datasets. I am trying to get a new variable in the second dataset, which looks up…
Weights calculation with metapropHello, I am conducting a meta-analysis of prevalence proportions using a random effects model with …
Edit graph with codeI've got 20 .gph files and I need to change the titles on all of them. Can I do that with Stata comm…
In need of help with Survey data analysis, survey settings/svysetHello there I am trying to perform a multinominal logistic regression using survey data and having t…
Subscribe to:
Post Comments (Atom)
0 Response to Question about conformability: multiple imputation for measurement error
Post a Comment