mable.dr {mable} | R Documentation |
MABLE in Desnity Ratio Model
Description
Maximum approximate Bernstein/Beta likelihood estimation in a density ratio model based on two-sample raw data.
Usage
mable.dr(
x,
y,
M,
regr,
...,
interval = c(0, 1),
alpha = NULL,
vb = 0,
baseline = NULL,
controls = mable.ctrl(),
progress = TRUE,
message = FALSE
)
Arguments
x , y |
original two sample raw data, codex:"Control", |
M |
a positive integer or a vector |
regr |
regressor vector function |
... |
additional arguments to be passed to regr |
interval |
a vector |
alpha |
initial regression coefficient, missing value is imputed by logistic regression |
vb |
code for vanishing boundary constraints, -1: f0(a)=0 only, 1: f0(b)=0 only, 2: both, 0: none (default). |
baseline |
the working baseline, "Control" or "Case", if |
controls |
Object of class |
progress |
logical: should a text progressbar be displayed |
message |
logical: should warning messages be displayed |
Details
Suppose that x
("control") and y
("case") are independent
samples from f0 and f1 which samples
satisfy f1(x)=f0(x)exp[alpha0+alpha'r(x)] with r(x)=(r1(x),...,r_d(x)). Maximum
approximate Bernstein/Beta likelihood estimates of (alpha0,alpha), f0 and f1
are calculated. If support is (a,b) then replace r(x) by r[a+(b-a)x].
For a fixed m
, using the Bernstein polynomial model for baseline f_0
,
MABLEs of f_0
and parameters alpha can be estimated by EM algorithm and Newton
iteration. If estimated lower bound m_b
for m
based on y
is smaller that that based on x
, then switch x
and y
and
f_1
is used as baseline. If M=m
or m0=m1=m
, then m
is a
preselected degree. If m0<m1
it specifies the set of consective
candidate model degrees m0:m1
for searching an optimal degree by
the change-point method, where m1-m0>3
.
Value
A list with components
-
m
the given or a selected degree by method of change-point -
p
the estimated vector of mixture proportionsp = (p_0, \ldots, p_m)
with the given or selected degreem
-
alpha
the estimated regression coefficients -
mloglik
the maximum log-likelihood at degreem
-
interval
support/truncation interval(a,b)
-
baseline
="control" iff_0
is used as baseline, or ="case" iff_1
is used as baseline. -
M
the vector(m0, m1)
, wherem1
, if greater thanm0
, is the largest candidate when the search stoped -
lk
log-likelihoods evaluated atm \in \{m_0, \ldots, m_1\}
-
lr
likelihood ratios for change-points evaluated atm \in \{m_0+1, \ldots, m_1\}
-
pval
the p-values of the change-point tests for choosing optimal model degree -
chpts
the change-points chosen with the given candidate model degrees
Author(s)
Zhong Guan <zguan@iusb.edu>
References
Guan, Z., Maximum Approximate Bernstein Likelihood Estimation of Densities in a Two-sample Semiparametric Model
Examples
# Hosmer and Lemeshow (1989):
# ages and the status of coronary disease (CHD) of 100 subjects
x<-c(20, 23, 24, 25, 26, 26, 28, 28, 29, 30, 30, 30, 30, 30, 32,
32, 33, 33, 34, 34, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39,
40, 41, 41, 42, 42, 42, 43, 43, 44, 44, 45, 46, 47, 47, 48, 49,
49, 50, 51, 52, 55, 57, 57, 58, 60, 64)
y<-c(25, 30, 34, 36, 37, 39, 40, 42, 43, 44, 44, 45, 46, 47, 48,
48, 49, 50, 52, 53, 53, 54, 55, 55, 56, 56, 56, 57, 57, 57, 57,
58, 58, 59, 59, 60, 61, 62, 62, 63, 64, 65, 69)
regr<-function(x) cbind(1,x)
chd.mable<-mable.dr(x, y, M=c(1, 15), regr, interval = c(20, 70))
chd.mable