Hi, I fully understand the issues with mean imputation, but I still need to use this as a quick solution to build proxy scales (not for publishable work). I have 65 variables and ~10k observations. Observations are named rf1, rf2, rf3...rf65. I've tried this:
foreach var of varlist rf* {
2. quietly sum 'var'
3. replace 'var' = r(mean) if missing('var')
4. }
but I get the "invalid name r(198);" error message. How else could I approach this?
Related Posts with Replace missing data with mean or average for summative scale purposes
Regression with timeHello everyone, I would like to run a regression with date for example as follows: Inflation=GDP+y…
Interact a dummy against its own continuousI find that it is very hard to interpret quadratic parameters. When I can see an inflection point i…
Xblc package (splines)Hi all clever people! I would like to make a smooth spline graph using the xblc package (for cox re…
Query about table generationHi, I meet difficulties to generate the table I need. Can you please provide suggestions for me? Tha…
Replace missing observation before first observation of sectionHi all, I want to summarize my fragility variable for different types of growth episodes, so first …
Subscribe to:
Post Comments (Atom)
0 Response to Replace missing data with mean or average for summative scale purposes
Post a Comment