estimateError: Estimate error (risk) of FlexCoDE object via test set

Description Usage Arguments Value

View source: R/basicFunctions.R

Description

Estimate error (risk) of FlexCoDE object via test set

Usage

1
estimateError(obj, x_test, z_test, se = TRUE, n_boot = 500, n_grid = 1000)

Arguments

obj

is an object of the class FlexCoDE typically fitted used fitFlexCoDE

x_test

Covariates for the sample used to test the model (one observation per row)

z_test

Response for the sample used to test the model (one observation per row)

se

Boolean flag determining if bootstrap standard error are computed. Default is TRUE

n_boot

Number of bootstrap samples used to calculate standard errors. Default is 500

n_grid

Number of grid points to evaluate conditional density. Default is 500.

Value

Estimated error (with SE if se = TRUE)


rizbicki/FlexCoDE documentation built on Feb. 10, 2022, 3:14 p.m.