% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/random_effects.R
\name{createRandomEffectSamples}
\alias{createRandomEffectSamples}
\title{Create RandomEffectSamples Object}
\usage{
createRandomEffectSamples(num_components, num_groups, random_effects_tracker)
}
\arguments{
\item{num_components}{Number of "components" or bases defining the random effects regression}

\item{num_groups}{Number of random effects groups}

\item{random_effects_tracker}{Object of type \code{RandomEffectsTracker}}
}
\value{
\code{RandomEffectSamples} object
}
\description{
Create a \code{RandomEffectSamples} object

This function is intended for advanced use cases in which users require detailed control of sampling algorithms and data structures.
Minimal input validation and error checks are performed -- users are responsible for providing the correct inputs.
For tutorials on the "proper" usage of the stochtree's advanced workflow, we provide several vignettes at \url{https://stochtree.ai/}
}
\examples{
n <- 100
rfx_group_ids <- sample(1:2, size = n, replace = TRUE)
rfx_basis <- matrix(rep(1.0, n), ncol=1)
num_groups <- length(unique(rfx_group_ids))
num_components <- ncol(rfx_basis)
rfx_tracker <- createRandomEffectsTracker(rfx_group_ids)
rfx_samples <- createRandomEffectSamples(num_components, num_groups, rfx_tracker)
}
