Profile-likelihood intervals for one single-cell bulk sample
Source:R/03_04_single_cell_inference.R
confint_profile_single_cell.RdInverts the likelihood-ratio test for one coordinate of the profile
log-likelihood. The two scales are concentrated out at every trial
value. An endpoint that lands on a face is not a Wilks interval;
use lrt_single_cell() for a boundary null.
Arguments
- y
Bulk vector of length \(G\).
- mean_signature_matrix
Reference mean, \(G\times J\).
- Sigma
Cell-level covariances, \(G\times G\times J\).
- level
Confidence level.
- celltypes
Cell types to profile. Defaults to every column.
- variance
"ml"(default) uses the \(\chi^2_1\) cut-off."reml"uses \(G\log\{1+F_{1,\nu;1-\alpha}/\nu\}\) with \(\nu=G-J\), the exact cut-off of the profile likelihood ratio when a variance scale is profiled out of a linear model.- epsilon
Relative function and step tolerances passed to
stats::nlminb().- itmax
Maximum number of iterations.
See also
confint_single_cell(), lrt_single_cell()
Other decovart_inference:
bootstrap_decovart(),
bootstrap_single_cell(),
boundary_diagnostics(),
chi_bar_square_pvalue(),
confint_decovart(),
confint_ilr_backtransform(),
confint_profile_decovart(),
confint_single_cell(),
equivariance_check_decovart(),
fit_firth_decovart(),
fit_firth_single_cell(),
lrt_decovart(),
lrt_single_cell(),
multistart_decovart(),
reference_bootstrap_decovart(),
reference_bootstrap_single_cell(),
restricted_mle_decovart(),
restricted_mle_single_cell()
Examples
mu <- matrix(c(2, 0.2, 0.2, 2, 0.2, 3, 0.2, 3), nrow = 4)
colnames(mu) <- c("ct1", "ct2")
sigma <- array(rep(diag(0.05, 4), 2), c(4, 4, 2))
y <- 20 * drop(mu %*% c(0.7, 0.3)) + c(0.3, -0.2, 0.1, -0.1)
confint_profile_single_cell(y, mu, sigma)
#> estimate lower upper
#> ct1 0.705328 0.7025836 0.7080680
#> ct2 0.294672 0.2919320 0.2974164