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
transition matrices in bar chartsHello, I want to convert my transition matrix (see data/code below) into a "transition bar chart" a…
Implementation of a single autoregressive term in a fixed effects modelHey to everyone, as I am facing a problem of a wrongly build autoregressive model I tried to change…
clogit/cmclogit omitted variablesHello, I'm having trouble when running a simple clogit command. My choice experiment is a labeled o…
Autocorrelation and Heteroskedasticity issuehi, i have panel data of 22 cities with 17 years, and i used log transformations for my variables in…
Interpretation of marginal effects in churdle model with a log-transformed dependent variableHey, I run a double hurdle model (more specifically, the 'churdle' command) and use a probit model …
Subscribe to:
Post Comments (Atom)
0 Response to Replace missing data with mean or average for summative scale purposes
Post a Comment