group_labelling: Compute a single estimated isotopic abundance for each sample...

Description Usage Arguments Details Value Author(s) Examples

Description

This function groups the fitted abundances in order to give a single estimated value for each sample group, with related standard error of the mean that takes into account both the errors relative to each estimate from the fitting procedure, and the variability across samples.

Usage

1
group_labelling(fitted_abundances, groups)

Arguments

fitted_abundances

Object of class labelling. It contains the results of the isotopic pattern analysis

groups

A factor containing the name of the group of each sample analysed; The function will calculate summary statistics for the samples belonging to the same group

Details

For each group, the average is simply computed by considering that the obtained individual values are representative of the population.

As for the standard deviations, they are obtained using the law of total variance: the overall variance in each group is the sum of two distinct contributions, the first one related to the uncertainties associated in each sample estimate, and the second one arising from the spread of the estimates (biological variability).

Value

A data frame containing the summary statistics calculated groupwise. For each row (a group), it details:

N

The number of samples in that group

Mean

The averaged estimated percentage isotopic abundance of the labelling isotope

SE mean

The standard error of the mean

t_crit

The critical value for a 95% confidence interval of the t distribution with N-1 degrees of freedom

Lower 95% CI

The lower 95% confidence interval value

Upper 95% CI

The upper 95% confidence interval value

Author(s)

Ruggero Ferrazza

Examples

1
2
3
4
5
## Not run: 
grouped_estimates <- group_labelling(fitted_abundances, 
                                     groups=factor(c(rep("CTRL",4), rep("TRTD",4))))

## End(Not run)

RuggeroFerrazza/IsotopicLabeling documentation built on May 9, 2019, 10:36 a.m.