calcTrajCI: Calculate the mean and CI around time series

Description Usage Arguments Value Examples

View source: R/calcTrajCI.R

Description

Calculate the mean and CI around time series

Usage

1
2
calcTrajCI(in.dt, in.col.meas, in.col.by = NULL, in.type = c("normal",
  "boot"), ...)

Arguments

in.dt

Data table in long format

in.col.meas

Name of the column with the measurement

in.col.by

Column names for grouping (default NULL - no grouping). Typically, you want to use at least a column with time.

in.type

Choice of normal approximation or boot-strapping

...

Other params passed to smean.cl.normal and smean.cl.boot; these include conf.int for the confidence level, B for the number of boot-strapping iterations.

Value

Datatable with columns: Mean, lower and upper CI, and grouping columns if provided.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(tca)

# generate synthetic time series; 100 time points long, with 10 randomly placed NAs
dt.tmp = genTraj(100, 10, 6, 3, in.addna = 10)

# calculate single stats from all time points
calcTrajCI(dt.tmp, 'objCyto_Intensity_MeanIntensity_imErkCor')

# calculate the mean and CI along the time course
calcTrajCI(dt.tmp, 'objCyto_Intensity_MeanIntensity_imErkCor', 'Metadata_RealTime')

dmattek/tca-package documentation built on Dec. 10, 2019, 4:10 p.m.