Extract the window-average event effect and confidence interval
Source:R/eventsurvey.R
extract.eventsurvey.Rdcoef() returns the estimated window-average event effect. confint()
returns its honest confidence interval by default; set
type = "conventional" to deliberately request the interval that accounts
for sampling uncertainty but not the estimated misspecification bound.
Arguments
- object
An object returned by
eventsurvey()oreventsurvey_summary().- ...
Unused.
- parm
The coefficient to select. It may be omitted or set to
"window_average_effect".- level
Confidence level. By default this is the level used to fit
object. Stored intervals cannot be returned at a different level; refit the model with anotheralphato change it.- type
Which interval to return: the default honest interval or the conventional interval.
Value
coef() returns a named numeric vector. confint() returns a
one-row matrix with lower and upper confidence limits.
Examples
fit <- eventsurvey(y ~ day, sample_data)
coef(fit)
#> window_average_effect
#> 0.2338301
confint(fit)
#> 2.5 % 97.5 %
#> window_average_effect -1.848577 2.435285
confint(fit, type = "conventional")
#> 2.5 % 97.5 %
#> window_average_effect -0.4510078 0.9186681