tobit_sd {ebTobit} | R Documentation |
Fit Tobit Standard Deviation via Maximum Likelihood
Description
Fit the matrix of standard deviations given censored observations current mean estimates. Currently there are four models for S implemented: global, column-specific, row-specific, and rank-1.
Usage
tobit_sd(
L,
R,
mu = matrix(colMeans(L + R)/2, nrow(L), ncol(L), byrow = TRUE),
sd.structure = "global",
interval = c(1e-04, 100),
tol = .Machine$double.eps^0.25,
maxiter = 1000
)
Arguments
L |
matrix of lower bounds on observations (n x p) |
R |
matrix of upper bounds on observations (n x p) |
mu |
matrix of known means (n x p) |
sd.structure |
structure imposed on noise level estimates, must be one of: "global", "column", "row", or "rank1" |
interval |
a vector containing the end-points of the interval defining
the convex search space (default: |
tol |
the desired accuracy |
maxiter |
early stopping condition |
Value
matrix of maximum likelihood estimates for each observation's standard deviation (n x p)
Examples
set.seed(1)
n = 100; p = 5; r = 2
U.true = matrix(stats::rexp(n*r), n, r)
V.true = matrix(sample(x = c(1,4,7),
size = p*r,
replace = TRUE,
prob = c(0.7, 0.2, 0.1)),
p, r)
TH = tcrossprod(U.true, V.true)
X = TH + matrix(stats::rnorm(n*p, sd = 1), n, p)
ldl <- 0.1 # lower detection limit, known to be non-negative
L <- ifelse(X < ldl, 0, X)
R <- ifelse(X < ldl, ldl, X)
tobit_sd(L, R, mu = TH)
tobit_sd(L, R, mu = TH, sd.structure = "column")
[Package ebTobit version 1.0.2 Index]