createForestDataset: Create a forest dataset object

View source: R/data.R

createForestDatasetR Documentation

Create a forest dataset object

Description

Create a forest dataset object

Usage

createForestDataset(covariates, basis = NULL, variance_weights = NULL)

Arguments

covariates

Matrix of covariates

basis

(Optional) Matrix of bases used to define a leaf regression

variance_weights

(Optional) Vector of observation-specific variance weights

Value

ForestDataset object

Examples

covariate_matrix <- matrix(runif(10*100), ncol = 10)
basis_matrix <- matrix(rnorm(3*100), ncol = 3)
weight_vector <- rnorm(100)
forest_dataset <- createForestDataset(covariate_matrix)
forest_dataset <- createForestDataset(covariate_matrix, basis_matrix)
forest_dataset <- createForestDataset(covariate_matrix, basis_matrix, weight_vector)

stochtree documentation built on April 4, 2025, 2:11 a.m.