Description Usage Arguments Value References Examples
View source: R/omicslondaHelper.R
Fits longitudinal samples from the same group using negative binomial smoothing splines or LOWESS
1 2 | curveFitting(formula = Count ~ Time, df = "NULL",
fit.method = "ssgaussian", points = NULL)
|
formula |
formula to be passed to the regression model |
df |
dataframe has the Count, Group, Subject, Time |
fit.method |
fitting method (ssgaussian) |
points |
points at which the prediction should happen |
a list that contains fitted smoothing spline for each group along with 95
Ahmed Metwally (ametwall@stanford.edu)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(SummarizedExperiment)
data("omicslonda_data_example")
omicslonda_se_object_adjusted = adjustBaseline(
se_object = omicslonda_data_example$omicslonda_se_object)
se_object = omicslonda_se_object_adjusted[1,]
dt = data.frame(colData(se_object))
dt$Count = as.vector(assay(se_object))
Group = as.character(dt$Group)
group.levels = sort(unique(Group))
gr.1 = as.character(group.levels[1])
gr.2 = as.character(group.levels[2])
df = dt
levels(df$Group) = c(levels(df$Group), "0", "1")
df$Group[which(df$Group == gr.1)] = 0
df$Group[which(df$Group == gr.2)] = 1
group.0 = df[df$Group == 0, ]
group.1 = df[df$Group == 1, ]
points = seq(1, 500)
model = curveFitting(formula = Count ~ Time, df = df, fit.method = "ssgaussian", points = points)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.