Skip to contents

Update and re-fit a synthdid model with different options

Usage

# S3 method for class 'synthdid'
update(object, formula. = NULL, method = NULL, ...)

Arguments

object

A synthdid object

formula.

An optional new formula

method

An optional new method

...

Additional arguments

Value

An updated synthdid object

Examples

# \donttest{
data(california_prop99)
result <- synthdid(PacksPerCapita ~ treated,
  data = california_prop99,
  index = c("State", "Year")
)
# Update to use different method
result_did <- update(result, method = "did")
c(sdid = coef(result), did = coef(result_did))
#> sdid.treated  did.treated 
#>    -15.60379    -27.34911 
# }