Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specific placebo.period? Gives NA when inputting an interval? #45

Open
MatthieuStigler opened this issue Oct 15, 2024 · 0 comments

Comments

@MatthieuStigler
Copy link

Could you please give an example of how to specify the placebo.period argument? The help file says:

two-element numeric vector specifying the range of pre-treatment period

But using for example placebo.period = -c(3,6) will return an object with att.placebo=NAN?

Also, could you elaborate on what happens when one uses say placebo.period = -3? Is the model estimated without the year corresponding to -3?

Thanks!

reprex

library(fect)
#> Registered S3 method overwritten by 'GGally':
#>   method from   
#>   +.gg   ggplot2
data(fect)

out_3 <- fect(Y ~ D + X1 + X2, data = simdata1, 
            index = c("id","time"), force = "two-way",
            parallel = FALSE, placeboTest=TRUE, placebo.period = -3) 

out_3_6 <- fect(Y ~ D + X1 + X2, data = simdata1, 
            index = c("id","time"), force = "two-way",
            parallel = FALSE, placeboTest=TRUE, placebo.period = -c(3,6)) 


out_3$placebo.period
#> [1] -3
out_3$att.placebo
#> [1] 0.9009807

out_3_6$placebo.period
#> [1] -3 -6
out_3_6$att.placebo
#> [1] NaN

Created on 2024-10-15 with reprex v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant