Closed Constantino-Carreto-Romero closed 10 months ago
@jorpppp
xteventtest
's tests if the trend
option was used in the previous call of xtevent
.xteventtest
after changes in https://github.com/JMSLab/xtevent/commit/1153e3aa257ea0fc14023b12c60819a6edd2eec7. The only option showing an error is overid
. Nonetheless, I think it is an expected error because the option inherits overidpre
's value from xtevent
's call (which is stated in the helpfile). Then, it tries to test pre-trends with that number of coefficients, but after the linear trend adjustment (with ols method), the number of pre-event coefficients available for the test is smaller.Thanks @Constantino-Carreto-Romero . We should be able to adjust the value of overidpre and overidpost that xtevent will use if the xtevent call used the trend option. Why don't you give it a shot?
@jmshapir @SimonFreyaldenhoven FYI
@jorpppp
sure thing, I'll try changing xteventtest
's overid
option. For instance, if first calling xtevent
with overidpre(5)
(and pre(0)
) and trend(-3, method(ols))
, then the available pre-event coefficients for xteventtest
's are only -5
and -4
. xteventtest
will try to test pre-trends using the first 5 pre-event coefficients, since now it will not find 5 pre-event coefficients available, but a smaller number of coefficients, it should try using all available pre-event coefficients. I think it should also show some message saying the change in the number of coefficients used for the test and what these coefficients are.
@Constantino-Carreto-Romero Yes, this sounds like a good plan. On some instances there won't be any coefficients available to test, in which case we may also want to have an informative error message.
update: I've not made progress, but I'm planning to retake today's afternoon.
@jorpppp
Summary: In this issue, we made changes to xteventtest
, so it doesn't use the endpoints in any of its tests if previously xtevent
used linear trend adjustment. We also modified the number of coefficients it uses to test pre-trends in some cases if previously xtevent
used linear trend adjustment with the ols method.
Changes brought to main in https://github.com/JMSLab/xtevent/commit/4198174fab4a012e3ab69eca0b76f2ecc9199e40
Thread continues in https://github.com/JMSLab/xtevent/pull/167
After running
xtevent
with thetrend
option to adjust for a linear trend, when executingxteventtest
the endpoints should not be considered in the tests.For instance, when executing:
If we then run:
we get:
but the coefficients considered for the test should be
8
and9
.