Newer
Older
% Please edit documentation in R/actual_mainfixeffects.R
\name{subsetFixEffectInferred}
\alias{subsetFixEffectInferred}
\title{Subset Fixed Effect Inferred Terms}
\usage{
subsetFixEffectInferred(tidy_tmb)
}
\arguments{
\item{tidy_tmb}{The tidy TMB object containing the inferred terms.}
}
\value{
A list with two elements:
\describe{
\item{fixed_term}{A list with two components - \code{nonInteraction} and \code{interaction},
containing the names of the fixed effect inferred terms categorized as non-interaction and interaction terms, respectively.}
\item{data}{A data frame containing the subset of tidy_tmb that contains the fixed effect inferred terms.}
}
}
\description{
This function subsets the tidy TMB object to extract the fixed effect inferred terms
along with their categorization into interaction and non-interaction terms.
}
\examples{
input_var_list <- init_variable()
mock_data <- mock_rnaseq(input_var_list, 10, 2, 2)
getData2computeActualFixEffect(mock_data$groundTruth$effect)
data2fit = prepareData2fit(countMatrix = mock_data$counts, metadata = mock_data$metadata )
#-- fit data
resFit <- fitModelParallel(formula = kij ~ myVariable ,
data = data2fit, group_by = "geneID",
family = glmmTMB::nbinom2(link = "log"), n.cores = 1)
tidy_tmb <- tidy_tmb(resFit)
subsetFixEffectInferred(tidy_tmb)
}