Description Usage Arguments Value Examples

View source: R/confounders_clsq_class.R

Univariate least squares regression models are used to compare models with and without potential confounding factors included. The change in coefficients (delta) is then computed for each potential confounding factor. Factors with a large delta are said to be having a large impact on the model and are therefore confounding. p-values are computed for models with confounders included to reduce potential false positives. Only suitable for main factors with 2 levels.

1 2 3 4 5 6 7 8 | ```
confounders_clsq(
alpha = 0.05,
mtc = "fdr",
factor_name,
confounding_factors,
threshold = 0.15,
...
)
``` |

`alpha` |
(numeric) The p-value cutoff for determining significance. The default is |

`mtc` |
(character) Multiple test correction method. Allowed values are limited to the following: `"bonferroni"` : Bonferroni correction in which the p-values are multiplied by the number of comparisons.`"fdr"` : Benjamini and Hochberg False Discovery Rate correction.`"none"` : No correction.
The default is |

`factor_name` |
(character) The name of the main factor with which other factors may be confounding. |

`confounding_factors` |
(character) The name(s) of factor(s) that are potential confounding factors. |

`threshold` |
(numeric) Factors with a delta greater than the the threshold are considered to be confounding. The default is |

`...` |
Additional slots and values passed to |

A `confounders_clsq`

object.

1 2 3 4 5 6 7 8 | ```
D = MTBLS79_DatasetExperiment()
M = filter_by_name(mode='include',dimension='variable',
names=colnames(D$data)[1:10]) + # first 10 features
filter_smeta(mode='exclude',levels='QC',
factor_name='class') + # reduce to two group comparison
confounders_clsq(factor_name = 'class',
confounding_factors=c('sample_order','batch'))
M = model_apply(M,D)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.