Learn R Programming

plmmr (version 4.2.3)

plmm_loss: Loss method for "plmm" class

Description

Loss method for "plmm" class

Usage

plmm_loss(y, yhat)

Value

A numeric vector of the squared-error loss values for the given observed and predicted outcomes

Arguments

y

Observed outcomes (response) vector

yhat

Predicted outcomes (response) vector

Examples

Run this code
admix_design <- create_design(X = admix$X, y = admix$y)
fit <- plmm(design = admix_design, K = relatedness_mat(admix$X))
yhat <- predict(object = fit, newX = admix$X, type = 'lp', lambda = 0.05)
head(plmm_loss(yhat = yhat, y = admix$y))

Run the code above in your browser using DataLab