compute.fit: Provided a standard curve, predict concentration from Ct

Description Usage Arguments Details Value See Also Examples

View source: R/primary_analysis.R

Description

compute.fit takes a fit transformed exponential regression model and uses its coefficients to predict best fit values for provided Cts, given boundaries on valid estimates defined by the standards.

Usage

1
compute.fit(fit.model, predictors, standard.limits)

Arguments

fit.model

Object of class lm from which regression coefficients are extracted.

standard.limits

Numeric vector of length 2, presumably the output of range

cycle.thresholds

Numeric vector of Ct values to convert to best fit concentrations.

Details

The transformation applied to the data assumes that regression has been performed on log2-transformed predictors (concentrations) and outcomes (Cts).

Value

Numeric vector of best fit concentrations, with out of bounds values set to NA.

See Also

create.analysis() for the standard curve calculation; lm() for linear regression.

Examples

1
2
3
4
fixed.concentrations <- c(4, 1.6, 0.64, 0.256, 0.1024, 0.041)
experimental.cts <- runif(20, 1, 38)
fit.model <- lm(log2(experimental.cts[1:6]) ~ log2(fixed.concentrations))
fit.values <- compute.fit(fit.model, experimental.cts, fixed.concentrations)

NCI-CGR/cgrtelomeres documentation built on Feb. 11, 2021, 12:12 p.m.