% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predictInterval_helpers.R
\name{simulate_glmm_response}
\alias{simulate_glmm_response}
\title{Simulate GLMM responses from conditional distribution}
\usage{
simulate_glmm_response(
  yhat,
  family,
  link,
  weights = NULL,
  use.probability = FALSE
)
}
\arguments{
\item{yhat}{Matrix of linear predictors (fixed + random effects).}

\item{family}{Character string specifying the distribution family.}

\item{link}{Character string specifying the link function.}

\item{weights}{Optional weights (for binomial with n-trial parameter).}

\item{use.probability}{For binomial, return proportions (0-1) instead of counts?}
}
\value{
Matrix of simulated responses with same dimensions as yhat.
}
\description{
Internal helper that simulates responses from the conditional distribution
of Y|b (given random effects) for GLMMs. This implements the correct
theoretical approach where residual variance is inherent in the distribution.
}
\keyword{internal}
