createForestDataset {stochtree} | R 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)
[Package stochtree version 0.1.1 Index]