Confidence intervals by mapping a Wald region through the ILR chart
Source:R/03_01_interior_intervals.R
confint_ilr_backtransform.RdForms a Wald interval for the unconstrained ILR coordinate \(\boldsymbol{\rho}\) from the expected Fisher information, then maps it to the simplex by the inverse chart \(\boldsymbol{\psi}\). For two cell types the map is monotone, so the endpoints of the interval for \(\rho\) are transformed. For more than two cell types the joint normal draw \(\boldsymbol{\rho}^{(b)}\) is transformed and the interval is the marginal quantile of \(\boldsymbol{\psi}(\boldsymbol{\rho}^{(b)})\). Every transformed draw is a composition, so the interval lies in \((0,1)\).
This is the default of confint_decovart(). The symmetric delta-method
interval on \(\boldsymbol{p}\) remains confint.decovart_fit().
Columns of y are replicates that share one composition: their number
multiplies the Fisher information.
Usage
confint_ilr_backtransform(
y,
mean_signature_matrix,
Sigma,
p = NULL,
level = 0.95,
n_draws = 2000L,
seed = NULL,
epsilon = 10^-8,
itmax = 500L
)Arguments
- y
Numeric vector of length \(G\), or \(G\times N\) matrix of replicate bulk profiles that share one composition; their log-likelihoods are summed (the pooled, population-level fit).
- mean_signature_matrix
Numeric matrix \(\boldsymbol{\mu}\in\mathcal{M}_{G\times J}\) (plug-in means).
- Sigma
Array of cell-type covariances in \(\mathcal{M}_{G\times G\times J}\).
- p
Composition at which to evaluate the information.
NULLuses the pooled maximum likelihood estimate.- level
Confidence level.
- n_draws
Monte Carlo size used when there are three or more cell types. Ignored for two cell types.
- seed
Optional seed for the Monte Carlo map. The previous random-number state is restored.
NULLleaves the state unchanged and draws from the current stream.- epsilon, itmax
Relative convergence tolerance and iteration budget passed to
stats::nlminb().
Value
A list with estimate, interval on the simplex, rho,
rho_interval (component-wise Wald bounds for \(\boldsymbol{\rho}\)),
vcov_rho, vcov, mapping ("endpoint" or "monte_carlo") and
n_obs. On a simplex face the interval is NA.
See also
confint_decovart(), vcov_ilr_delta(),
confint.decovart_fit()
Other decovart_inference:
bootstrap_decovart(),
bootstrap_single_cell(),
boundary_diagnostics(),
chi_bar_square_pvalue(),
confint_decovart(),
confint_profile_decovart(),
confint_profile_single_cell(),
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()