Skip to contents

coef() 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.

Usage

# S3 method for class 'eventsurvey'
coef(object, ...)

# S3 method for class 'eventsurvey'
confint(
  object,
  parm,
  level = 1 - object$settings$alpha,
  type = c("honest", "conventional"),
  ...
)

Arguments

object

An object returned by eventsurvey() or eventsurvey_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 another alpha to 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