segCCR: Fit the segmented correspondence curve regression

View source: R/segCCR.R

segCCRR Documentation

Fit the segmented correspondence curve regression

Description

Fit the correspondence curve regression

Usage

segCCR(data, par.ini, tm, NB = 100, sig.level = 0.05)

Arguments

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which segCCR is called.

par.ini

the initial values for the estimate parameters. The first component is the change point. If is.null(par.ini) == TRUE, par.ini is set in the the details.

tm

The vector of tm.

NB

The bootstrap times to obtain the estimated standard errors.

sig.level

The significant level. Default is 0.05.

Details

Please refer to Zhang, F. and Li, Q. (2022).

Value

A list with the elements:

coefficients

a named vector of coefficients.

std.error

the estimated standard errors.

CI

the confidence intervals.

pv

the p-values for individual test.

jointpv

the p-values for joint test.

Author(s)

Feipeng Zhang and Qunhua Li

References

Zhang, F. and Li, Q. (2022). Segmented correspondence curve regression for quantifying covariate effects on the reproducibility of high-throughput experiments.

Examples

## The example of ChIP-seq data
## Not run: 
data(ChIPseq)
## estimate
m = 100
tm <- seq(0.01, 0.999, length.out = m)
nx = nlevels(factor(ChIPseq$x))
par.ini = c(0.5, 2, 1, rep(0.1, 2*(nx-1)))  # initial value
fit = segCCR(data = ChIPseq,
           par.ini = par.ini,
           tm=tm,
           NB = 5)

## End(Not run)

FPZhang2015/segCCR documentation built on June 25, 2022, 5:20 a.m.