get_elts_trun_gauss: The R implementation to get the elements necessary for...

View source: R/genscore.R

get_elts_trun_gaussR Documentation

The R implementation to get the elements necessary for calculations for the gaussian setting (a=1, b=1) on domains other than R^p.

Description

The R implementation to get the elements necessary for calculations for the gaussian setting (a=1, b=1) on domains other than R^p.

Usage

get_elts_trun_gauss(
  hdx,
  hpdx,
  x,
  centered = TRUE,
  profiled_if_noncenter = TRUE,
  scale = "",
  diagonal_multiplier = 1
)

Arguments

hdx

A matrix, h(\mathbf{x}) applied to the distance of x from the boundary of the domain, should be of the same dimension as x.

hpdx

A matrix, h'(\mathbf{x}) applied to the distance of x from the boundary of the domain, should be of the same dimension as x.

x

An n by p matrix, the data matrix, where n is the sample size and p the dimension.

centered

A boolean, whether in the centered setting (assume \boldsymbol{\mu}=\boldsymbol{\eta}=0) or not. Default to TRUE.

profiled_if_noncenter

A boolean, whether in the profiled setting (\lambda_{\boldsymbol{\eta}}=0) if non-centered. Parameter ignored if centered=TRUE. Default to TRUE.

scale

A string indicating the scaling method. Returned without being checked or used in the function body. Default to "norm".

diagonal_multiplier

A number >= 1, the diagonal multiplier.

Details

For details on the returned values, please refer to get_elts_ab or get_elts.

Value

A list that contains the elements necessary for estimation.

n

The sample size.

p

The dimension.

centered

The centered setting or not. Same as input.

scale

The scaling method. Same as input.

diagonal_multiplier

The diagonal multiplier. Same as input.

diagonals_with_multiplier

A vector that contains the diagonal entries of \boldsymbol{\Gamma} after applying the multiplier.

setting

The setting "gaussian".

g_K

The \boldsymbol{g} vector. In the non-profiled non-centered setting, this is the \boldsymbol{g} sub-vector corresponding to \mathbf{K}.

Gamma_K

The \boldsymbol{\Gamma} matrix with no diagonal multiplier. In the non-profiled non-centered setting, this is the \boldsymbol{\Gamma} sub-matrix corresponding to \mathbf{K}.

g_eta

Returned in the non-profiled non-centered setting. The \boldsymbol{g} sub-vector corresponding to \boldsymbol{\eta}.

Gamma_K_eta

Returned in the non-profiled non-centered setting. The \boldsymbol{\Gamma} sub-matrix corresponding to interaction between \mathbf{K} and \boldsymbol{\eta}.

Gamma_eta

Returned in the non-profiled non-centered setting. The \boldsymbol{\Gamma} sub-matrix corresponding to \boldsymbol{\eta}.

t1, t2

Returned in the profiled non-centered setting, where the \boldsymbol{\eta} estimate can be retrieved from \boldsymbol{t_1}-\boldsymbol{t_2}\hat{\mathbf{K}} after appropriate resizing.

Examples

n <- 50
p <- 30
mu <- rep(0, p)
K <- diag(p)
eta <- K %*% mu
domain <- make_domain("R+", p=p)
x <- gen(n, setting="gaussian", abs=FALSE, eta=eta, K=K, domain=domain, finite_infinity=100, 
       xinit=NULL, seed=2, burn_in=1000, thinning=100, verbose=FALSE)
h_hp <- get_h_hp("min_pow", 1, 3)
h_hp_dx <- h_of_dist(h_hp, x, domain) # h and h' applied to distance from x to boundary
elts <- get_elts_trun_gauss(h_hp_dx$hdx, h_hp_dx$hpdx, x, centered=TRUE, scale="norm", diag=1.5)
elts <- get_elts_trun_gauss(h_hp_dx$hdx, h_hp_dx$hpdx, x, centered=FALSE,
       profiled_if_noncenter=TRUE, scale="norm", diag=1.7)
elts <- get_elts_trun_gauss(h_hp_dx$hdx, h_hp_dx$hpdx, x, centered=FALSE,
       profiled_if_noncenter=FALSE, scale="norm", diag=1.9)

genscore documentation built on May 29, 2024, 9 a.m.