Sorry, I did not realize that there was more pages, so couldnt find my post. Look at #18 for my question
-
Login or Register
- Log in with
xtpoisson salary i.treatment##i.time..., vce(robust) fe
margins, dydx(treatment) at(time = 99 101)) lincom _b[1.treatment:2._at]-_b[1.treatment:1bn._at] di (exp(r(estimate))-1)*100
. poisson salary c.treatment##ib(99).time, vce(cluster id) Iteration 0: log pseudolikelihood = -36592.386 Iteration 1: log pseudolikelihood = -36592.386 Poisson regression Number of obs = 100 Wald chi2(7) = . Prob > chi2 = . Log pseudolikelihood = -36592.386 Pseudo R2 = 0.1445 (Std. Err. adjusted for 16 clusters in id) ---------------------------------------------------------------------------------- | Robust salary | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------+---------------------------------------------------------------- treatment | .0263173 .076578 0.34 0.731 -.1237728 .1764074 | time | 97 | -.0202027 .0205503 -0.98 0.326 -.0604805 .020075 98 | 8.97e-16 1.19e-08 0.00 1.000 -2.33e-08 2.33e-08 100 | -.0202027 .0205503 -0.98 0.326 -.0604805 .020075 101 | 1.06e-15 .033385 0.00 1.000 -.0654334 .0654334 102 | .0263173 .0263149 1.00 0.317 -.0252589 .0778935 103 | 1.04e-15 . . . . . | time#c.treatment | 97 | -.0263173 .0382658 -0.69 0.492 -.1013169 .0486823 98 | -.04652 .0322794 -1.44 0.150 -.1097865 .0167464 100 | -.0061146 .0333884 -0.18 0.855 -.0715547 .0593255 101 | -.1771402 .0446678 -3.97 0.000 -.2646875 -.0895929 102 | -.2034575 .0396627 -5.13 0.000 -.281195 -.12572 103 | -.1771402 .0509788 -3.47 0.001 -.2770568 -.0772236 | _cons | 10.48331 .0540899 193.81 0.000 10.37729 10.58932 ---------------------------------------------------------------------------------- . margins, eydx(treatment) at(time = (99 101)) Average marginal effects Number of obs = 100 Model VCE : Robust Expression : Predicted number of events, predict() ey/dx w.r.t. : treatment 1._at : time = 99 2._at : time = 101 ------------------------------------------------------------------------------ | Delta-method | ey/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- treatment | _at | 1 | .0263173 .076578 0.34 0.731 -.1237728 .1764074 2 | -.1508229 .0829549 -1.82 0.069 -.3134116 .0117658 ------------------------------------------------------------------------------ . di r(table)[1,2]-r(table)[1,1] -.1771402
. bys id (time): keep if _N == 7 (23 observations deleted) . . poisson salary c.treatment##ib(99).time gender Iteration 0: log likelihood = -540.67223 Iteration 1: log likelihood = -540.66877 Iteration 2: log likelihood = -540.66877 Poisson regression Number of obs = 77 LR chi2(14) = 49279.35 Prob > chi2 = 0.0000 Log likelihood = -540.66877 Pseudo R2 = 0.9785 ---------------------------------------------------------------------------------- salary | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------+---------------------------------------------------------------- treatment | -.0007677 .0031363 -0.24 0.807 -.0069147 .0053794 | time | 97 | -5.07e-17 .0030151 -0.00 1.000 -.0059095 .0059095 98 | -5.63e-17 .0030151 -0.00 1.000 -.0059095 .0059095 100 | -2.28e-17 .0030151 -0.00 1.000 -.0059095 .0059095 101 | 2.86e-16 .0030151 0.00 1.000 -.0059095 .0059095 102 | 3.06e-16 .0030151 0.00 1.000 -.0059095 .0059095 103 | 3.20e-16 .0030151 0.00 1.000 -.0059095 .0059095 | time#c.treatment | 97 | 4.36e-16 .0044291 0.00 1.000 -.0086809 .0086809 98 | 4.44e-16 .0044291 0.00 1.000 -.0086809 .0086809 100 | 8.90e-17 .0044291 0.00 1.000 -.0086809 .0086809 101 | -.1410786 .0045183 -31.22 0.000 -.1499342 -.132223 102 | -.1410786 .0045183 -31.22 0.000 -.1499342 -.132223 103 | -.1410786 .0045183 -31.22 0.000 -.1499342 -.132223 | gender | -.29438 .0014577 -201.95 0.000 -.2972369 -.291523 _cons | 10.59846 .0021684 4887.68 0.000 10.59421 10.60271 ---------------------------------------------------------------------------------- . . xtset id panel variable: id (balanced) . xtpoisson salary c.treatment##ib(99).time gender, fe note: treatment dropped because it is constant within group note: gender dropped because it is constant within group Iteration 0: log likelihood = -3453.2366 Iteration 1: log likelihood = -443.11526 Iteration 2: log likelihood = -442.71387 Iteration 3: log likelihood = -442.71387 Conditional fixed-effects Poisson regression Number of obs = 77 Group variable: id Number of groups = 11 Obs per group: min = 7 avg = 7.0 max = 7 Wald chi2(12) = 5966.20 Log likelihood = -442.71387 Prob > chi2 = 0.0000 ---------------------------------------------------------------------------------- salary | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------+---------------------------------------------------------------- time | 97 | -1.41e-17 .0030151 -0.00 1.000 -.0059095 .0059095 98 | -1.37e-17 .0030151 -0.00 1.000 -.0059095 .0059095 100 | -1.45e-17 .0030151 -0.00 1.000 -.0059095 .0059095 101 | -4.13e-17 .0030151 -0.00 1.000 -.0059095 .0059095 102 | -4.09e-17 .0030151 -0.00 1.000 -.0059095 .0059095 103 | 5.96e-23 .0030151 0.00 1.000 -.0059095 .0059095 | time#c.treatment | 97 | 1.18e-15 .0044291 0.00 1.000 -.0086809 .0086809 98 | 1.18e-15 .0044291 0.00 1.000 -.0086809 .0086809 99 | 0 (omitted) 100 | 9.21e-16 .0044291 0.00 1.000 -.0086809 .0086809 101 | -.1410786 .0045183 -31.22 0.000 -.1499343 -.132223 102 | -.1410786 .0045183 -31.22 0.000 -.1499343 -.132223 103 | -.1410786 .0045183 -31.22 0.000 -.1499343 -.132223 ----------------------------------------------------------------------------------
. xtset id panel variable: id (unbalanced) . xtpoisson salary c.treatment##ib(99).time, fe note: treatment dropped because it is constant within group Iteration 0: log likelihood = -5157.3203 Iteration 1: log likelihood = -609.10207 Iteration 2: log likelihood = -608.27842 Iteration 3: log likelihood = -608.27842 Conditional fixed-effects Poisson regression Number of obs = 100 Group variable: id Number of groups = 16 Obs per group: min = 3 avg = 6.2 max = 7 Wald chi2(12) = 9002.57 Log likelihood = -608.27842 Prob > chi2 = 0.0000 ---------------------------------------------------------------------------------- salary | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------+---------------------------------------------------------------- time | 97 | 1.43e-17 .0027776 0.00 1.000 -.005444 .005444 98 | 2.73e-17 .0028284 0.00 1.000 -.0055436 .0055436 100 | 6.94e-17 .0027776 0.00 1.000 -.005444 .005444 101 | 2.82e-17 .0028761 0.00 1.000 -.0056371 .0056371 102 | 9.81e-17 .0029418 0.00 1.000 -.0057659 .0057659 103 | -2.17e-19 .0028284 -0.00 1.000 -.0055436 .0055436 | time#c.treatment | 97 | .0033096 .004007 0.83 0.409 -.0045439 .0111631 98 | .0033096 .0040424 0.82 0.413 -.0046132 .0112325 99 | 0 (omitted) 100 | .0016513 .0040466 0.41 0.683 -.0062798 .0095824 101 | -.14877 .0041968 -35.45 0.000 -.1569955 -.1405445 102 | -.1491716 .0042385 -35.19 0.000 -.1574789 -.1408643 103 | -.1484763 .0041901 -35.43 0.000 -.1566888 -.1402638 ---------------------------------------------------------------------------------- . di (exp(_b[101.time#c.treatment])-1)*100 -13.823273
Comment