BJnoint | R Documentation |
Compute the Buckley-James estimator in the regression model
y_i = \beta x_i + \epsilon_i
with right censored y_i
. Iteration method.
BJnoint(x, y, delta, beta0 = NA, maxiter=30, error = 0.00001)
x |
a matrix or vector containing the covariate, one row per observation. |
y |
a numeric vector of length N, censored responses. |
delta |
a vector of length N, delta=0/1 for censored/uncensored. |
beta0 |
an optional vector for starting value of iteration. |
maxiter |
an optional integer to control iterations. |
error |
an optional positive value to control iterations. |
This function compute the Buckley-James estimator
when your model do not have an intercept term.
Of course, if you include a column of 1's in the x
matrix,
it is also OK with this function and it
is equivalent to having an intercept term.
If your model do have an intercept term, then you could also use the function
bj( )
in the Design
library. It should be more refined
than BJnoint
in the stopping rule for the iterations. However, the variance
estimator bj( )
provided is not consistent.
This function is included here mainly to produce the estimator value
that may provide some useful information with the function bjtest( )
.
For example you may want to test a beta value near the
Buckley-James estimator.
A list with the following components:
beta |
the Buckley-James estimator. |
iteration |
number of iterations performed. |
Mai Zhou.
Buckley, J. and James, I. (1979). Linear regression with censored data. Biometrika, 66 429-36.
Zhou, M. (2016). Empirical Likelihood Method in Survival Analysis. CRC Publishing.
x <- matrix(c(rnorm(50,mean=1), rnorm(50,mean=2)), ncol=2,nrow=50)
## Suppose now we wish to test Ho: 2mu(1)-mu(2)=0, then
y <- 2*x[,1]-x[,2]
xx <- c(28,-44,29,30,26,27,22,23,33,16,24,29,24,40,21,31,34,-2,25,19)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.