estimate store name
で分析結果をメモリーに保存できる.
論文のtableみたいに表示させたいときは,
estimate store name1 name2 namex
で呼び出せる.
表示させる数値はデフォだとcoef.
b(%7.4f) p stats(N df_m r2_p)
たとえば,これだと,bは7桁まで出力して(みにくいから4桁まで表示),p値,統計量(サンプルサイズ,df,疑似決定係数).詳しくは, help-logistic-Stored resultsを参照するとよい.
AICはよくわからんかった.
estat ic
でそれぞれのモデルについては出力してくれる.たまにはこれぐらい自分で計算したほうがいいかもしれない(数理的な意味は何度読んでもさっぱりわからんが)
Stored results
logistic stores the following in e():
Scalars
e(N) number of observations
e(N_cds) number of completely determined successes
e(N_cdf) number of completely determined failures
e(k) number of parameters
e(k_eq) number of equations in e(b)
e(k_eq_model) number of equations in overall model test
e(k_dv) number of dependent variables
e(df_m) model degrees of freedom
e(r2_p) pseudo-R-squared
e(ll) log likelihood
e(ll_0) log likelihood, constant-only model
e(N_clust) number of clusters
e(chi2) chi-squared
e(p) significance of model test
e(rank) rank of e(V)
e(ic) number of iterations
e(rc) return code
e(converged) 1 if converged, 0 otherwise
他人のがみたい.
/*model 1*/
logit leaving ///
male_dummy ageb sibling_1 sibling_3 sibling_4andmore urban15 ///
income_0 income_less_than_150 income_150_250 income_350_450 income_more_than_450 income_na univ ///
univ_father univ_father_na wealth15 ///
year
estimate store model1/*model 2 male*/
sort male_dummy
logit leaving ///
ageb sibling_1 sibling_3 sibling_4andmore urban15 ///
income_0 income_less_than_150 income_150_250 income_350_450 income_more_than_450 income_na univ ///
univ_father univ_father_na wealth15 ///
year if male_dummy==1
estimate store model2ma/*model 2 male*/
sort male_dummy
logit leaving ///
ageb sibling_1 sibling_3 sibling_4andmore urban15 ///
income_0 income_less_than_150 income_150_250 income_350_450 income_more_than_450 income_na univ ///
univ_father univ_father_na wealth15 ///
year if male_dummy==0
estimate store model2fe/*model 3 male*/
sort male_dummy
logit leaving ///
ageb sibling_1 sibling_3 sibling_4andmore urban15 ///
income_0 income_less_than_150 income_150_250 income_350_450 income_more_than_450 income_na univ ///
univ_father univ_father_na wealth15 ///
year int_urban_wealth if male_dummy==1
estimate store model3ma/*model 3 female*/
sort male_dummy
logit leaving ///
ageb sibling_1 sibling_3 sibling_4andmore urban15 ///
income_0 income_less_than_150 income_150_250 income_350_450 income_more_than_450 income_na univ ///
univ_father univ_father_na wealth15 ///
year int_urban_wealth if male_dummy==0
estimate store model3feestimate table model1 model2ma model2fe model3ma model3fe, b(%7.4f) p stats(N df_m r2_p)
Stata が出力してくれる疑似決定係数(Pseudo R2)の値,いったいなんなのかよくわかってないんだけど,どうも McFadden’s R2 ぽい.確証はない.http://www.ats.ucla.edu/stat/mult_pkg/faq/general/Psuedo_RSquareds.htm