calc.zerocoef {ptw} | R Documentation

## Correction for warping coefficients when using zeropadding

### Description

This function calculates the warping coefficients for the original range of the data, based on the warping of zero-filled data. Only needed when zeros are added in the beginning of the signal.

### Usage

    calc.zerocoef(coef, zeros)

### Arguments

`coef` | vector of warping coefficients of a PTW-calculation on a set of signals with zeros added to the beginning of the signal
`zeros` | the number of zeros added

### Value

a vector containing the corrected warping coefficients

### Author(s)

Jan Gerretzen

### References

Bloemberg, T.G., et al. (2010) "Improved parametric time warping for Proteomics", Chemometrics and Intelligent Laboratory Systems, 104 (1), 65 – 74.

### See Also

`padzeros` `calc.multicoef`

### Examples

    data(gaschrom)
    gaschrom.zf <- padzeros(gaschrom, 250)
    ref <- gaschrom[1,]
    samp <- gaschrom[16,]
    ref.zf <- gaschrom.zf[1,]
    samp.zf <- gaschrom.zf[16,]
    gaschrom.ptw <- ptw(ref.zf, samp.zf)
    layout(matrix(1:2,2,1, byrow=TRUE))
    plot(gaschrom.ptw)
    corr.coef <- calc.zerocoef(gaschrom.ptw$warp.coef, 250)
    gaschrom.ptw2 <- ptw(ref, samp, init.coef = corr.coef, try = TRUE)
    plot(gaschrom.ptw2)

[Package ptw version 1.9-13 Index]