Description Usage Arguments Value Examples
View source: R/heterogeneity.R
Calculate Age-related Expression and Heterogeneity Changes for Gene
1 2 | calc.het.feat(exprs, age, modex = "linear",
het_change_met = "spearman")
|
exprs |
a numeric vector with the expression values, ordered the same as age vector |
age |
a numeric vector, where the names correspond to samples (the same as colnames of the given matrix). |
modex |
expression change calculation method. 'linear' or 'loess', defaults to 'linear' |
het_change_met |
heterogeneity change calculation method. 'LR', for 'linear regression', or and correlation method accepted by cor.test() function. |
a list with i) summary results with the effect size and p value for expression level and heterogeneity changes, ii) residuals from expr~age model, which corresponds to unexplained variance, iii) expression values passed into the function.
1 2 3 4 5 6 7 | myexp <- rnorm(n = 20, mean = sample(1:3, 1), sd = sample(c(1, 3), 1))
agevec <- sample(20:80,20)
het_result <- calc.het.feat(myexp, agevec)
head(het_result$summary) # summary statistics
het_result$residuals # heterogeneity values: residuals
het_result$expression # input expression values
all(myexp == het_result$expression)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.