Hi, I am a graduate student.
First, I will explain my situation.
I have a dependent variable(score), regressors(v1,v2,v3), and a variable distinguishing group (named agedummy).
In this situation, I want to run regression for each group(young and old).
So, I run a command as following.
.xtset pid wave
.bysort agedummy: xtreg score v1 v2 v3, fe vce(robust)
But, stata shows me a error massage "the by prefix may not be used with vce() option.
In this case, how can I run the fixed effect regression with robust vce??
Please, help me!
Related Posts with bysort and vce option
Arellano Bond MethodHello everyone, My regression looks in the following way: yit=a0 + a1xit + a2Dit +a3Lit + a4mit + …
How to create a date variable based on the birth year and a month counting variable?Hi everyone, I'm currently having a long data set with the following structure: case month birth…
Generating predict after marginsHello, I would like to use margins in a similar way as we can use predict after regression (e.g. pr…
What's the most advantageous points of Stata compared with Python or R?What's the most advantageous points of Stata compared with Python or R? What's the advantageous poi…
How to tell Stata "end" if for the "program define" rather than the loop?In a loop syntax, I need to define a program and do some calculating, however, Stata breaked when en…
Subscribe to:
Post Comments (Atom)
0 Response to bysort and vce option
Post a Comment