Skip to content
Snippets Groups Projects
Commit 898ca7fe authored by Arnaud Duvermy's avatar Arnaud Duvermy
Browse files

remove problematic part returning err

parent ab0199e6
Branches
Tags
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment