predict.LinCDE: predict.LinCDE

View source: R/predict.LinCDE.R

predict.LinCDER Documentation

predict.LinCDE

Description

This function makes predictions from a LinCDE model.

Usage

## S3 method for class 'LinCDE'
predict(
  object,
  ...,
  X = NULL,
  y = NULL,
  splitPointYTest = NULL,
  densityOnly = TRUE
)

Arguments

object

a LinCDE model.

...

other parameters.

X

input matrix for prediction, of dimension nobs x nvars; each row represents an observation vector.

y

response vector for prediction, of length nobs.

splitPointYTest

vector of response break points. Default is NULL.

densityOnly

a logical value. If TRUE, only return predicted conditional densities density.

Value

The function returns a list of values.

  • density: conditional density predictions at y, vector of length nobs. If y = NULL, return NA.

  • testLogLikelihood: average test log-likelihood at y. If y = NULL, return NA.

  • cellProb: cell probability prediction matrix, of dimension nobs x number of discretization bins; each row represents a cell probability vector.

  • yDiscretized: vector of discretized responses/response residuals, of length number of discretization bins. If splitPointYTest = NULL, discretized responses/response residuals from the LinCDE model object are used.


ZijunGao/LinCDE documentation built on Jan. 2, 2023, 11:14 p.m.