R/casewise.R
binregCasewise.Rd
Estimates the casewise concordance based on Concordance and marginal estimate using binreg
binregCasewise(concbreg, margbreg, zygs = c("DZ", "MZ"), newdata = NULL, ...)
Concordance
Marginal estimate
order of zygosity for estimation of concordance and casewise.
to give instead of zygs.
to pass to estimate function
Uses cluster iid for the two binomial-regression estimates standard errors better than those of casewise that are often conservative.
data(prt)
prt <- force.same.cens(prt,cause="status")
dd <- bicompriskData(Event(time, status)~strata(zyg)+id(id), data=prt, cause=c(2, 2))
newdata <- data.frame(zyg=c("DZ","MZ"),id=1)
## concordance
bcif1 <- binreg(Event(time,status)~-1+factor(zyg)+cluster(id), data=dd,
time=80, cause=1, cens.model=~strata(zyg))
pconc <- predict(bcif1,newdata)
## marginal estimates
mbcif1 <- binreg(Event(time,status)~cluster(id), data=prt, time=80, cause=2)
mc <- predict(mbcif1,newdata)
mc
#> pred se lower upper
#> 1 0.04751637 0.002253132 0.04310023 0.05193251
#> 2 0.04751637 0.002253132 0.04310023 0.05193251
cse <- binregCasewise(bcif1,mbcif1)
cse
#> $coef
#> Estimate 2.5% 97.5%
#> p1 0.1586277 0.1029195 0.2444898
#> p2 0.4041311 0.2843829 0.5743030
#>
#> $logcoef
#> Estimate Std.Err 2.5% 97.5% P-value
#> p1 -1.841 0.2207 -2.274 -1.4086 7.331e-17
#> p2 -0.906 0.1793 -1.257 -0.5546 4.346e-07
#>