loss_h {registr}R Documentation

Loss function for registration step optimization

Description

Loss function for registration step optimization

Usage

loss_h(
  Y,
  Theta_h,
  mean_coefs,
  knots,
  beta.inner,
  family,
  t_min,
  t_max,
  t_min_curve,
  t_max_curve,
  incompleteness = NULL,
  lambda_inc = NULL,
  periodic = FALSE,
  Kt = 8,
  warping = "nonparametric",
  priors = FALSE,
  prior_sd = NULL
)

Arguments

Y

vector of observed points.

Theta_h

B-spline basis for inverse warping functions.

mean_coefs

spline coefficient vector for mean curve.

knots

knot locations for B-spline basis used to estimate mean and FPC basis function.

beta.inner

spline coefficient vector to be estimated for warping function h.

family

One of c("gaussian","binomial","gamma","poisson"). For internal purposes, can also be set to "gamma-varEM" and "poisson-varEM" if the preceding FPCA step in register_fpca was performed with fpca_type = "variationalEM" which uses Gaussian family.

t_min, t_max

minimum and maximum value to be evaluated on the time domain.

t_min_curve, t_max_curve

minimum and maximum value of the observed time domain of the (potentially incomplete) curve.

incompleteness

Optional specification of incompleteness structure. One of c("leading","trailing","full"), specifying that incompleteness is present only in the initial measurements, only in the trailing measurements, or in both, respectively. For details see the accompanying vignette. Defaults to NULL, i.e. no incompleteness structure. Can only be set when warping = "nonparametric".

lambda_inc

Penalization parameter to control the amount of overall dilation of the domain. The higher this lambda, the more the registered domains are forced to have the same length as the observed domains. Only used if incompleteness is not NULL.

periodic

If TRUE uses periodic b-spline basis functions. Default is FALSE.

Kt

Number of B-spline basis functions used to estimate mean functions. Default is 8.

warping

If nonparametric (default), inverse warping functions are estimated nonparametrically. If piecewise_linear2 they follow a piecewise linear function with 2 knots.

priors

For warping = "piecewise_linear2" only. Logical indicator of whether to add Normal priors to pull the knots toward the identity line.

prior_sd

For warping = "piecewise_linear2" with priors = TRUE only. User-specified standard deviation for the Normal priors (single value applied to all 4 knot priors).

Value

The scalar value taken by the loss function.

Author(s)

Julia Wrobel julia.wrobel@cuanschutz.edu, Erin McDonnell eim2117@cumc.columbia.edu, Alexander Bauer alexander.bauer@stat.uni-muenchen.de


[Package registr version 2.1.0 Index]