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
Age and Age^2/100Hello, I am currently doing a panel data regression using fixed effects and have recently tumbled up…
How to import multi-section option from excel to StataHi! I have a question in terms of import data from excel to Stata. Say if one of the column in my ex…
Postestimation tests with xtsurDear Statalist, I am trying to estimate a regression with Panel data SUR method with the command xt…
Propensity Score MatchingThis though is not software related, at least not yet, however, I would like to know conditions for …
Panel regressionHello, I am working with panel data where T=23 and N= 22 (country). I performed the following steps…
Subscribe to:
Post Comments (Atom)
0 Response to Replace missing data with mean or average for summative scale purposes
Post a Comment