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
Problems with generating group identifierDear all, I'm having a problem with making a variable that identifies a group. I have a data set wi…
Draw figure like this?Dear All, I have this dataset Code: * Example generated by -dataex-. To install: ssc install dataex…
has problem with : recode with more than one if conditionDear All, I have two variables V1 and V2 . V2 has the option (1= Control , 2= CBE, 3=Government) …
How to remove " and "?Dear All, I have this dataset: Code: * Example generated by -dataex-. To install: ssc install datae…
Identify life events in panel dataHi Statalist. I would like to be able to identify life events within a panel dataset with multiple w…
Subscribe to:
Post Comments (Atom)
0 Response to Question about conformability: multiple imputation for measurement error
Post a Comment