predict.cvpensynth {pensynth}R Documentation

Create prediction from cvpensynth model

Description

Matrix multiplies the values in newdata by the unit weights extracted from the cvpensynth object to produce predicted values.

Usage

## S3 method for class 'cvpensynth'
predict(object, newdata, lambda, ...)

Arguments

object

a fitted cvpensynth model

newdata

N_values * N_donors matrix of values for the donor units.

lambda

desired lambda value (defaults to optimal lambda)

...

ignored

Details

For a chosen lambda that is not in the list of tested lambdas in the cvpensynth object, the closest lambda (on the log scale) will be chosen.

Value

a matrix (column vector) of predicted values


[Package pensynth version 0.5.1 Index]