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
2023 Canadian Stata ConferenceDear colleagues, The 2023 Canadian Stata Conference will be held on 4 August 2023 at Toronto Metrop…
Categorical Overlay on Bar GraphsI'm having some trouble finding the right way to make this graph. I want to combine two bar charts a…
Generate a local with a prefixI have two locals set up to help me run regressions over a variety of sample restrictions. From thes…
GMNL change distribution of random parameter to log-normalI am using the gmnl model in STATA and I am trying to change the distribution of one of the random p…
Use if else loop to implement multiple conditional statementsHi Statalist community, Gig workers are individuals who have multiple employers and they can work f…
Subscribe to:
Post Comments (Atom)
0 Response to Question about conformability: multiple imputation for measurement error
Post a Comment