Hi Dear Statalist,
I want to handle the endogenity for mlogit. My endogenous variables are two variables(each of them has two levels), and my number of observations is 4807. According to the https://www.statalist.org/forums/for...ction-approach forum, professor Wooldridge confirms that the code about using bootstrap work well for a reasonable estimate of the standard errors for the multinomial logit model.
I implement these code for my work, but the Stata errors "insufficient observations to compute bootstrap standard errors no results will be saved". I read many forums about this problem, but I can't understand why this happens and how can I handle it. Please help me to solve it, I'm so beginner in Stata.
global ylist method
global xlist Age hh_size i.work i.marital i.gender i.educ i.region i.hh_income i.spend_reduced /*
*/ i.importance_attribute_payment i.cc_hasbal i.cc_reward i.cc_ratio i.cc_revolver i.dc_free end_cash_bal log_Amount /*
*/ EaseCC EaseDC CostCC CostDC RecordCC RecordDC
// set up the program including 1st and 2nd stage
gen merch_accep_cash_norm = merch_accep_cash-1
gen merch_accep_card_norm = merch_accep_card-1
program define my2sls
probit merch_accep_cash_norm $xlist
predict merch_accep_cash_Hat , pr
gen merch_accep_cash_residual = merch_accep_cash_norm - merch_accep_cash_Hat
probit merch_accep_card_norm $xlist
predict merch_accep_card_Hat , pr
gen merch_accep_card_residual = merch_accep_card_norm - merch_accep_card_Hat
mlogit $ylist $xlist merch_accep_card_residual merch_accep_cash_residual [pw=ind_weight] , baseoutcome(1)
end
// obtain bootstrapped standard errors
*bootstrap "sim" _b _se, reps(400) dots
bootstrap , reps(50): my2sls
I want to handle the endogenity for mlogit. My endogenous variables are two variables(each of them has two levels), and my number of observations is 4807. According to the https://www.statalist.org/forums/for...ction-approach forum, professor Wooldridge confirms that the code about using bootstrap work well for a reasonable estimate of the standard errors for the multinomial logit model.
I implement these code for my work, but the Stata errors "insufficient observations to compute bootstrap standard errors no results will be saved". I read many forums about this problem, but I can't understand why this happens and how can I handle it. Please help me to solve it, I'm so beginner in Stata.
global ylist method
global xlist Age hh_size i.work i.marital i.gender i.educ i.region i.hh_income i.spend_reduced /*
*/ i.importance_attribute_payment i.cc_hasbal i.cc_reward i.cc_ratio i.cc_revolver i.dc_free end_cash_bal log_Amount /*
*/ EaseCC EaseDC CostCC CostDC RecordCC RecordDC
// set up the program including 1st and 2nd stage
gen merch_accep_cash_norm = merch_accep_cash-1
gen merch_accep_card_norm = merch_accep_card-1
program define my2sls
probit merch_accep_cash_norm $xlist
predict merch_accep_cash_Hat , pr
gen merch_accep_cash_residual = merch_accep_cash_norm - merch_accep_cash_Hat
probit merch_accep_card_norm $xlist
predict merch_accep_card_Hat , pr
gen merch_accep_card_residual = merch_accep_card_norm - merch_accep_card_Hat
mlogit $ylist $xlist merch_accep_card_residual merch_accep_cash_residual [pw=ind_weight] , baseoutcome(1)
end
// obtain bootstrapped standard errors
*bootstrap "sim" _b _se, reps(400) dots
bootstrap , reps(50): my2sls
Comment