roiMLE: Compute the MLE for a selected region of interest

Description Usage Arguments

View source: R/newMLEfunction.R

Description

Computes the conditional mle for a region selected based on the selection rule y[selected] > threshold or y[selected] < -threshold, and the coordinates which were not selected must violate the selection rule.

Usage

1
2
3
4
5
6
roiMLE(y, cov, threshold, compute = c("mle", "lower-CI", "upper-CI"),
  ci_alpha = 0.025, coordinates = NULL, selected = NULL,
  mean_weights = NULL, projected = NULL, regularization_param = NULL,
  regularization_slack = 1, init = NULL, progress = FALSE,
  sampling_control = roi_sampling_control(),
  mle_control = roi_mle_control())

Arguments

y

the observed noraml coordinates

cov

the covariance of y

threshold

the threshold used in the selection rule. Must be either a scalar or a numeric vector of size length(y)

coordinates

an optional matrix of the coordinates of the observed vector. This is only relevant if y corresponds to a spatial or temporal observation

selected

an optional boolean vector, with TRUE coordinates corresponding to coordinates of y that were selected.

mean_weights

the weights to use for the contrast to be computed, if not specified then equal weights will be given to all selected coordinates. mean_weights do not have to sum to one. If specified, then the length of the vector must either equal sum(selected) (the number of selected coordinates), or length(y). Either way, all coordinates which were not selected must be given a weight of zero.

projected

an optional fixed value that mean(mu) must equal. Can be used to construct profile likelihood post-selection confidence intervals.

regularization_param

an optional penalty value for the tykohonov regularizer. This is an (inferior) altenative to specifying a regularization_slack.

regularization_slack

the estimation routine uses first differences Tykohonov regularization to estimate the mean of the selected region. regularization_slack speficies the allowed deviation from the observed first order differences. The description for details

init

initial value for the mean estimate

progress

whether to display a bar describing the progress of the gradient algorithm.

sampling_control

a list with control parameters for sampling from the estimated distribution.

mle_contorl

a list of parameters to be used when computed the conditional MLE.


ammeir2/selectiveROI documentation built on March 16, 2020, 1:30 a.m.