diff --git a/vignettes/htrfit.Rmd b/vignettes/htrfit.Rmd index cc567c0a50df3b2e6d0ac7875517aa5ab6472568..b376ffac4126e99d1b8535da066abb1797b03e60 100644 --- a/vignettes/htrfit.Rmd +++ b/vignettes/htrfit.Rmd @@ -583,56 +583,6 @@ resSimu <- evaluation_report(list_tmb = l_tmb, resSimu$performances ``` -## Evaluate model inference involving mixed effects - -For certain experimental scenarios, such as those involving a high number of levels or longitudinal data, the utilization of mixed effects within your design formula can be beneficial. The **HTRfit** simulation framework also offers the capability to assess this type of design formula. - - -```{r example-evalMixed, warning = FALSE, message = FALSE} -## -- init a design with a high number of levels -input_var_list <- init_variable( name = "varA", mu = 0.2, sd = 0.74, level = 60) %>% - init_variable( name = "varB", mu = 0.27, sd = 0.6, level = 2) %>% - add_interaction( between_var = c("varA", "varB"), mu = 0.44, sd = 0.89) -## -- simulate RNAseq data -mock_data <- mock_rnaseq(input_var_list, - n_genes = 30, ## small number to prevent excessively lengthy vignette construction - min_replicates = 10, - max_replicates = 10, - basal_expression = 5 ) -## -- prepare data & fit a model with mixed effect -data2fit = prepareData2fit(countMatrix = mock_data$counts, - metadata = mock_data$metadata, - normalization = F, - response_name = "kij") -l_tmb <- fitModelParallel(formula = kij ~ varB + (varB | varA), - data = data2fit, - group_by = "geneID", - family = glmmTMB::nbinom2(link = "log"), - n.cores = 1) -## -- evaluation -resSimu <- evaluation_report(list_tmb = l_tmb, - dds = NULL, - mock_obj = mock_data, - coeff_threshold = 0.27, - alt_hypothesis = "greater") -``` - -```{r example-outputResSimuMixed_id, warning = FALSE, message = FALSE, fig.align = 'center', fig.height = 4, fig.width = 5} -## -- identity plot -###### 1) Model params -resSimu$identity$params -###### Dispersion params -resSimu$identity$dispersion -``` - -```{r example-outputResSimuMixed_metric, warning = FALSE, message = FALSE, fig.align = 'center', fig.height = 4, fig.width = 7} -## -- precision-recall curve -resSimu$precision_recall$params -## -- ROC curve -resSimu$roc$params -## -- Performances metrics -resSimu$performances -``` ## Structure of evaluation report object