truncComp | R Documentation |
Two-sample comparison of truncated continuous outcome by parametric of semi-parametric maximum likelihood.
truncComp(y, a, z, method, conf.level = 0.95, init = NULL)
y |
outcome |
a |
truncation indicator |
z |
binary treatment indicator |
method |
|
conf.level |
The level for the confidence intervals (default = 0.95) |
init |
An optinal named list of initial values for the parametric maximum likelihood optimaztion. If uninitialized the function tried to calculate sensible initial values by moment estimation. |
Returns an S3 object of class truncComp
. The object includes the following elements:
muDelta |
hej |
muDeltaCI |
hej |
alphaDelta |
hej |
alphaDeltaCI |
hej |
W |
hej |
p |
hej |
method |
hej |
conf.level |
hej |
success |
hej |
error |
hej |
init |
hej |
Andreas Kryger Jensen <aeje@sund.ku.dk>
print.truncComp
, summary.truncComp
library(TruncComp) d <- simTruncData(n = 100, mu0 = 3, mu1 = 3.5, pi0 = 0.6, pi1 = 0.5) truncComp(d$Y, d$A, d$Z, method="LRT") truncComp(d$Y, d$A, d$Z, method="SPLRT")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.