% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/casewise.R
\name{binregCasewise}
\alias{binregCasewise}
\title{Estimate Casewise Concordance Using Binomial Regression}
\usage{
binregCasewise(concbreg, margbreg, zygs = c("DZ", "MZ"), newdata = NULL, ...)
}
\arguments{
\item{concbreg}{Concordance object from \code{binreg}.}

\item{margbreg}{Marginal estimate object from \code{binreg}.}

\item{zygs}{Order of zygosity for estimation (e.g., \code{c("DZ","MZ")}).}

\item{newdata}{Data frame to give instead of \code{zygs}.}

\item{...}{Arguments passed to \code{estimate}.}
}
\value{
A list containing:
  \item{coef}{Exponentiated coefficients (ratios).}
  \item{logcoef}{Log-scale coefficients and standard errors.}
}
\description{
Estimates the casewise concordance based on concordance and marginal estimates 
obtained from \code{binreg} objects. Uses cluster-based IID for standard errors, 
which are often better than those from \code{casewise} (which can be conservative).
}
\examples{
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)

cse <- binregCasewise(bcif1,mbcif1)
cse
}
\author{
Thomas Scheike
}
