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

\item{num_groups}{Number of random effects groups}
}
\value{
\code{RandomEffectsModel} object
}
\description{
Create a \code{RandomEffectsModel} 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_model <- createRandomEffectsModel(num_components, num_groups)
}
