predictLong: Obtain predictions

View source: R/predictLong.R

predictLongR Documentation

Obtain predictions

Description

A function to obtain predictions based on either filtering or smoothing distributions.

Usage

predictLong(
  Y,
  locs,
  pInd,
  locs.pred,
  Brandom.pred = NULL,
  Bfixed.pred,
  return.samples = FALSE,
  type = "Filter",
  quantiles = NULL,
  predict.derivatives = NULL,
  excursions = NULL,
  crps = FALSE,
  crps.skip = 10,
  Y.val,
  mixedEffect_list,
  measurment_list,
  processes_list,
  operator_list = NULL,
  nSim = 1,
  nBurnin = 10,
  silent = FALSE,
  max.num.threads = 2,
  repeat.mix = 10,
  seed = NULL
)

Arguments

Y

A numeric list that contains outcome values.

locs

A numeric list that contains the timings at which the outcomes are collected.

pInd

A numeric vector that contains the indices of longitudinal subjects for whom the predictions are to be obtained.

locs.pred

A numeric list that contains the timings of the repeated measurements.

Brandom.pred

A numeric list that contains random effects covaraite matrices.

Bfixed.pred

A numeric list that contains fixed effects covaraite matrices.

type

A character string for the type of prediction: "Filter" for filtering, "Smoothing" for smoothing.

quantiles

A two-elemnent vector that contains the quantiles of the predictions to be calculated.

predict.derivatives

STUFF

excursions

A list of excursion probabilities to compute. Each list should contain:

  • "type" - type of excursion '>' or '<',

  • "level" - level to compute excursion probability for,

  • "process" - which expression for the model, x\alpha + dU + W + Z with x \alpha being fixed effects, dU random effects and Z noise, to compute the probability for. 'X' for x\alpha + dU + W, 'W' for W, 'Y' for x\alpha + dU + W + Z, 'Xderivative' for the first derivarive of x\alpha + dU + W, and 'Wderivative' for the first derivariate of W.

crps

A logical variable for calculating continuous ranked probability score (CRPS); "TRUE" indicates calculate, "FALSE" do not calculate.

crps.skip

A numerical value, say a, that indicates every ath element of the sample to be used to compute the crps score.

Y.val

Observations to use when calculating CRPS

mixedEffect_list

A list of inputs for random effects.

  • noise The distribution of the mixed effects.

  • B_random A list that contains the random effect covariates (needs to be matrix, can be NULL).

  • B_fixed A list that contains the fixed effect covariates (needs to be matrix, can be NULL).

  • beta_random Initial values for the parameters of the random effects (mean parameter) (if not specified set to zero).

  • beta_fixed Initial values for the parameters of the fixed effects (if not specified set to zero).

  • Sigma Initial values for the parameters of the variance-covariance matrix of the random effects (if not specified set to I ).

  • nu Shape parameter for noise (NIG only)

  • mu Shift parameter for noise (NIG only)

  • U A list of inital values of the random effects.

  • V A list of inital values of the variance effects.

measurment_list

A list of inputs for measurement error.

  • sigma Measurement noise variance parameter.

  • nu Shape parameter for noise (NIG only).

  • Vs A list of inital values for the noise of the measurement.

processes_list

A list of inputs for the process.

  • noise Distribution of the process.

  • nu Shape parameter (for NIG or GAL).

  • mu Asymmetry parameter (for NIG or GAL).

nSim

A numeric value for the number of samples of the Gibbs sampler to estimate the gradient.

silent

A logical value for printing the details of the iterations; "TRUE" indicates do not print, "FALSE" indicates print.

max.num.threads

STUFF

repeat.mix

STUFF

seed

A numerical value for starting the Gibbs samplers from fixed seed.

Details

This function calls "predictLong_cpp" internally. It is wrapped by "predict.ngme", and not advised to be used.

Value

.samples A logical variable for returning the Monte Carlo samples used to compute the predictions; "TRUE" indicates return, "FALSE" do not return.

A list of output.

See Also

predict.ngme

Examples

  ## Not run: 
  predictLong(...)
  
## End(Not run)

davidbolin/ngme documentation built on Dec. 5, 2023, 11:48 p.m.