-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Like:
library(CBPS)
library(data.table)
library(spduration)
data("bscoup")
dt <- data.table(bscoup)
dt <- dt[complete.cases(dt)]
# get weights by matching on treatment : recentcoups
fit <- CBPS(recentcoups ~ milreg + instab,
data = dt,method = "exact")
dt[,coup := as.numeric(coup)-1]
# estimate hazard with with weights
model<- glm(coup ~ instab + recentcoups + wealth,
weights = fitted(fit),data=dt,family=quasibinomial(link="cloglog"))
Reactions are currently unavailable