Hello,
I am interested in whether school closures (due to covid-19), measured by percentage of school year being closed, led to worsened school performance on standardized test scores, measured by percentile.
I am looking at two years 2019 and 2022. In the regression I control for average school grade and number of disadvantaged children.
Since there were no school closures in 2019, I inputed the value 0 for 2019. I was told that there is no difference between fixed effects regression and first differencing with just 2 time periods.
However, when I run the command, I get different results and different number of observations:
xtset school_id rok, delta(3)
reg D.(ptil closed_proportion grade disadvant)
xtreg ptil closed_proportion grade disadvant, fe
Why is that?
Example dataset
input float rok str3 subject long school_id double ptil float(grade closed_proportion) double disadvant float(ptil_dif grade_dif closed_dif disadvant_dif)
2019 "SJ" 100000013 35.047967721781376 2.666667 0 0 . . . .
2022 "SJ" 100000013 38.14444444444445 2.1111112 . 0 3.096477 -.5555556 . 0
2019 "SJ" 100000041 81.96630220746663 1.382353 0 0 . . . .
2022 "SJ" 100000041 84.18653846153848 1.403846 . 0 2.2202363 .021493196 . 0
2019 "SJ" 100000045 69.34415891533975 2.0625 0 0 . . . .
2022 "SJ" 100000045 67.7189189189189 1.7297298 .08627474 0 -1.62524 -.3327702 .08627474 0
2019 "SJ" 100000048 67.12281254926691 1.85 0 0 . . . .
2022 "SJ" 100000048 66.24999999999999 1.9473684 .1559737 0 -.8728126 .09736836 .1559737 0
2019 "SJ" 100000055 32.596628829681016 2.625 0 0 . . . .
2022 "SJ" 100000055 56.92083333333332 1.6666666 .14245245 0 24.324205 -.9583334 .14245245 0
2019 "SJ" 100000056 85.346474565985 1.8387097 0 0 . . . .
2022 "SJ" 100000056 80.20344827586207 1.862069 .1181213 0 -5.143026 .0233593 .1181213 0
2019 "SJ" 100000083 56.070308726780425 1.952381 0 0 . . . .
2022 "SJ" 100000083 68.5862068965517 1.5172414 .10075132 0 12.515898 -.4351395 .10075132 0
2019 "SJ" 100000098 74.1370627288174 2.0833333 0 0 . . . .
2022 "SJ" 100000098 81.22127600645005 1.862745 .16792187 0 7.084213 -.2205882 .16792187 0
Thank you for any ideas.
I am interested in whether school closures (due to covid-19), measured by percentage of school year being closed, led to worsened school performance on standardized test scores, measured by percentile.
I am looking at two years 2019 and 2022. In the regression I control for average school grade and number of disadvantaged children.
Since there were no school closures in 2019, I inputed the value 0 for 2019. I was told that there is no difference between fixed effects regression and first differencing with just 2 time periods.
However, when I run the command, I get different results and different number of observations:
xtset school_id rok, delta(3)
reg D.(ptil closed_proportion grade disadvant)
xtreg ptil closed_proportion grade disadvant, fe
Why is that?
Example dataset
input float rok str3 subject long school_id double ptil float(grade closed_proportion) double disadvant float(ptil_dif grade_dif closed_dif disadvant_dif)
2019 "SJ" 100000013 35.047967721781376 2.666667 0 0 . . . .
2022 "SJ" 100000013 38.14444444444445 2.1111112 . 0 3.096477 -.5555556 . 0
2019 "SJ" 100000041 81.96630220746663 1.382353 0 0 . . . .
2022 "SJ" 100000041 84.18653846153848 1.403846 . 0 2.2202363 .021493196 . 0
2019 "SJ" 100000045 69.34415891533975 2.0625 0 0 . . . .
2022 "SJ" 100000045 67.7189189189189 1.7297298 .08627474 0 -1.62524 -.3327702 .08627474 0
2019 "SJ" 100000048 67.12281254926691 1.85 0 0 . . . .
2022 "SJ" 100000048 66.24999999999999 1.9473684 .1559737 0 -.8728126 .09736836 .1559737 0
2019 "SJ" 100000055 32.596628829681016 2.625 0 0 . . . .
2022 "SJ" 100000055 56.92083333333332 1.6666666 .14245245 0 24.324205 -.9583334 .14245245 0
2019 "SJ" 100000056 85.346474565985 1.8387097 0 0 . . . .
2022 "SJ" 100000056 80.20344827586207 1.862069 .1181213 0 -5.143026 .0233593 .1181213 0
2019 "SJ" 100000083 56.070308726780425 1.952381 0 0 . . . .
2022 "SJ" 100000083 68.5862068965517 1.5172414 .10075132 0 12.515898 -.4351395 .10075132 0
2019 "SJ" 100000098 74.1370627288174 2.0833333 0 0 . . . .
2022 "SJ" 100000098 81.22127600645005 1.862745 .16792187 0 7.084213 -.2205882 .16792187 0
Thank you for any ideas.
Comment