truncComp: Two-sample comparison of truncated continuous outcome

View source: R/truncComp.R

truncCompR Documentation

Two-sample comparison of truncated continuous outcome

Description

Two-sample comparison of truncated continuous outcome by parametric of semi-parametric maximum likelihood.

Usage

truncComp(y, a, z, method, conf.level = 0.95, init = NULL)

Arguments

y

outcome

a

truncation indicator

z

binary treatment indicator

method

LRT for parametric maximum likelihood and SPLRT for semi-parametric maximum likelihood

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.

Value

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

Author(s)

Andreas Kryger Jensen <aeje@sund.ku.dk>

See Also

print.truncComp, summary.truncComp

Examples

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")

aejensen/TruncComp documentation built on Feb. 8, 2023, 3:42 p.m.