Hello everyone,
I’m a beginner in STATA, and my professor requires us to create a table that combines Year Fixed Effects, Max VIF, and AUC.
I have worked on these elements separately, but I’m struggling with the fixed effects and how to combine all the data into one table.
Below, I have listed my work so far, along with the differences between my results and what I aim to achieve.
Thanks for your reading and any possible answer.
Here is my work and the code I used:
AUC:
logit failed cfta nitl clta cta cacl qarev if fyear==2018
lroc
logit failed cfta nitl clta cta cacl qarev if fyear==2019
lroc
logit failed cfta nitl clta cta cacl qarev if fyear==2020
lroc
logit failed cfta nitl clta cta cacl qarev if fyear==2021
lroc
logit failed cfta nitl clta cta cacl qarev if fyear==2022
lroc
VIF:
logit failed cfta nitl clta cta cacl qarev
vif, uncentered
Fixed Effect:
I saw some people suggest to use common: logit failed cfta nitl clta cta cacl qarev i.fyear, vice(robust)
But I only result "option vice() not allowed" so I'm not sure is it nascency or I should install any other package.
Table:
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear if fyear==2018
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear if fyear==2019
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear if fyear==2020
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear if fyear==2021
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear if fyear==2022
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear
esttab , pr2 t(2) b(3) nogap compress star(* 0.10 ** 0.05 *** 0.01) label title(My regression table) nonumbers mtitles("2018" "2019" "2020" "2021" "2022" "COMBINED")
However, the reference code from my professor is like:
*regressions
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector if fyear==2008
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector if fyear==2007
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector if fyear==2006
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector if fyear==2005
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector if fyear==2004
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector i.fyear
*output to stata
esttab , pr2 t(2) b(3) nogap compress star(* 0.10 ** 0.05 *** 0.01) label title(My regression table) nonumbers mtitles("2008" "2007" "2006" "2005" "2004" "COMBINED") addnote("footnotes")
*output to txt
esttab using output.rtf, replace pr2 t(2) b(3) nogap compress star(* 0.10 ** 0.05 *** 0.01) label title(My regression table) nonumbers mtitles ("2008" "2007" "2006" "2005" "2004" "COMBINED") addnote("footnotes")
I’m a beginner in STATA, and my professor requires us to create a table that combines Year Fixed Effects, Max VIF, and AUC.
I have worked on these elements separately, but I’m struggling with the fixed effects and how to combine all the data into one table.
Below, I have listed my work so far, along with the differences between my results and what I aim to achieve.
Thanks for your reading and any possible answer.
Here is my work and the code I used:
AUC:
logit failed cfta nitl clta cta cacl qarev if fyear==2018
lroc
logit failed cfta nitl clta cta cacl qarev if fyear==2019
lroc
logit failed cfta nitl clta cta cacl qarev if fyear==2020
lroc
logit failed cfta nitl clta cta cacl qarev if fyear==2021
lroc
logit failed cfta nitl clta cta cacl qarev if fyear==2022
lroc
VIF:
logit failed cfta nitl clta cta cacl qarev
vif, uncentered
Fixed Effect:
I saw some people suggest to use common: logit failed cfta nitl clta cta cacl qarev i.fyear, vice(robust)
But I only result "option vice() not allowed" so I'm not sure is it nascency or I should install any other package.
Table:
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear if fyear==2018
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear if fyear==2019
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear if fyear==2020
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear if fyear==2021
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear if fyear==2022
eststo: quietly logit failed cfta nitl clta cta cacl qarev i.fyear
esttab , pr2 t(2) b(3) nogap compress star(* 0.10 ** 0.05 *** 0.01) label title(My regression table) nonumbers mtitles("2018" "2019" "2020" "2021" "2022" "COMBINED")
However, the reference code from my professor is like:
*regressions
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector if fyear==2008
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector if fyear==2007
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector if fyear==2006
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector if fyear==2005
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector if fyear==2004
eststo: quietly logit failed cftd tdta recta mkvalta i.gsector i.fyear
*output to stata
esttab , pr2 t(2) b(3) nogap compress star(* 0.10 ** 0.05 *** 0.01) label title(My regression table) nonumbers mtitles("2008" "2007" "2006" "2005" "2004" "COMBINED") addnote("footnotes")
*output to txt
esttab using output.rtf, replace pr2 t(2) b(3) nogap compress star(* 0.10 ** 0.05 *** 0.01) label title(My regression table) nonumbers mtitles ("2008" "2007" "2006" "2005" "2004" "COMBINED") addnote("footnotes")
Comment