Skip to content
Snippets Groups Projects
getInput2simulation.Rd 1.65 KiB
Newer Older
Arnaud Duvermy's avatar
Arnaud Duvermy committed
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulation.R
\name{getInput2simulation}
\alias{getInput2simulation}
\title{Get input for simulation based on coefficients}
\usage{
getInput2simulation(
  list_var,
  n_genes = 1,
  normal_distr = "multivariate",
  fix_reference_effect = FALSE,
Arnaud Duvermy's avatar
Arnaud Duvermy committed
}
\arguments{
\item{list_var}{A list of variables (already initialized)}

\item{n_genes}{Number of genes to simulate (default: 1)}

\item{normal_distr}{Specifies the distribution type for generating effects. Choose between 'univariate' or 'multivariate' (default).
\itemize{
\item 'univariate': Effects are drawn independently from univariate normal distributions.
\item 'multivariate': Effects are drawn jointly from a multivariate normal distribution.
}}

\item{fix_reference_effect}{A logical value indicating whether the effect of the reference label should be fixed to zero. If set to TRUE, the effect of the
reference label is constrained to zero, ensuring that it does not contribute to the model. If set to FALSE, the effect from the reference label is picked
randomly from the distribution specified by the user. This option works only when \code{normal_distr} is set to 'univariate'. Default is FALSE.}

Arnaud Duvermy's avatar
Arnaud Duvermy committed
\item{input2mvrnorm}{Input to the \code{mvrnorm} function for simulating data from multivariate normal distribution (default: NULL)}
}
\value{
A data frame with input coefficients for simulation
}
\description{
This function generates input data for simulation based on the coefficients provided in the \code{list_var} argument.
}
\examples{
# Example usage
list_var <- init_variable()
getInput2simulation(list_var, n_genes = 10)
}