Hi Statalisters,
I am trying to impute missing crime data found in the UCR. However, I am not sure how to proceed after the estimation stage. Am I supposed to use the already imputed values? I understand that pooling collects the data post-estimation and gives one set of results. However, I am not being able to understand how do I get to that. I would greatly appreciate some help. P.S. This is my first time using the MI package.
mi impute chained (pmm, knn(15)) Murder Manslaughter Rape Robbery Assault Burglary Larceny_Theft ///
Vehicle_Theft Other_Assault Arson Forgery Fraud Embezzlement Stolen_Property Vandalism Weapons ///
Prostitution Drugs_Offenses Drugs_Sale Drugs_Possesion DUI Disorderly ///
= Tot_Officers Tot_Civ_Emp i.Major i.Minor Unemp_Rate Male_Perc Hispanic_Perc ///
Black_Perc Age_1624_Perc PerCapWageL PopDensityL ///
, add(20) rseed(12345) nolegend noisily bootstrap
local dep_vars "Murder Manslaughter Rape Robbery Assault Burglary Larceny_Theft Vehicle_Theft Other_Assault Arson Forgery Fraud Embezzlement Stolen_Property Vandalism Weapons Prostitution Drugs_Offenses Drugs_Sale Drugs_Possesion DUI Disorderly "
local indep_vars "Tot_Officers Tot_Civ_Emp Unemp_Rate Male_Perc Hispanic_Perc Black_Perc Age_1624_Perc PerCapWageL PopDensityL"
foreach dep_var in `dep_vars' {
mi estimate, vartable: xtreg `dep_var' `indep_vars' L.Major L.Minor i.year , fe vce(cluster fips)
mi predict xb(`dep_var'_pred)
}
I am trying to impute missing crime data found in the UCR. However, I am not sure how to proceed after the estimation stage. Am I supposed to use the already imputed values? I understand that pooling collects the data post-estimation and gives one set of results. However, I am not being able to understand how do I get to that. I would greatly appreciate some help. P.S. This is my first time using the MI package.
mi impute chained (pmm, knn(15)) Murder Manslaughter Rape Robbery Assault Burglary Larceny_Theft ///
Vehicle_Theft Other_Assault Arson Forgery Fraud Embezzlement Stolen_Property Vandalism Weapons ///
Prostitution Drugs_Offenses Drugs_Sale Drugs_Possesion DUI Disorderly ///
= Tot_Officers Tot_Civ_Emp i.Major i.Minor Unemp_Rate Male_Perc Hispanic_Perc ///
Black_Perc Age_1624_Perc PerCapWageL PopDensityL ///
, add(20) rseed(12345) nolegend noisily bootstrap
local dep_vars "Murder Manslaughter Rape Robbery Assault Burglary Larceny_Theft Vehicle_Theft Other_Assault Arson Forgery Fraud Embezzlement Stolen_Property Vandalism Weapons Prostitution Drugs_Offenses Drugs_Sale Drugs_Possesion DUI Disorderly "
local indep_vars "Tot_Officers Tot_Civ_Emp Unemp_Rate Male_Perc Hispanic_Perc Black_Perc Age_1624_Perc PerCapWageL PopDensityL"
foreach dep_var in `dep_vars' {
mi estimate, vartable: xtreg `dep_var' `indep_vars' L.Major L.Minor i.year , fe vce(cluster fips)
mi predict xb(`dep_var'_pred)
}
Comment