averageData {RPPanalyzer} | R Documentation |
Average biological replicates over different slides.
Description
The function assumes that each signal originates from an underlying true value which is scaled by a scaling factor depending on the slide and replicate. The method optimizes the scaling and truth parameters such that the distance between predicted and actual signals is minimized. There are aguments to specify what factors the scaling factors and truth parameters depend on.
Usage
averageData(subsample, scaling = c("slide", "replicate"),
distinguish = c("cellline", "treatment"))
Arguments
subsample |
data.frame with columns "slide" (factor, the slide names), "ab" (factor, the antibody/target names), "time" (numeric, the time points), "signal" (numeric, signal values), "var0" (numeric, error parameter for the constant error), "varR" (numeric, error parameter for the relative error). The data.frame may contain further columns that can then be used in the |
scaling |
character. One scaling parameter ist estimated for each occurring combination of the corresponding factors. |
distinguish |
character. One truth parameter ist estimaed for each occuring combination of the factors "time", "ab" (antibody/target) and the factors in |
Details
Averaging is based on the assumption that for each level of scaling
there is an underlying "true" antibody time-course for each level of distinguish
. The signals of different scaling levels are assumed to differ by a scaling factor. Both, antibody time-course values and scaling parameters are estimated simulatenously by generalized least squares estimation:
GRSS = \sum_{i,j}(s_i S_{ij}- y_j/s_i)^2/(\sigma_{ij,0}^2 + (y_j/s_i)^2 \sigma_{ij,R}^2)
where i, j
correspond to the levels of c("time", "ab", distinguish)
and the levels of scaling
.
Value
data.frame |
with columns "time", "ab", "signal" (the truth parameters returned by |
Author(s)
Daniel Kaschek, Physikalisches Institut, Uni Freiburg. Email: daniel.kaschek@physik.uni-freiburg.de