Description Usage Arguments Details Value See Also Examples

`metaCDW`

determines the relevant peak of
several time series and fits four- resp. six-parametric
Weibull curves to these peaks of all series at once and extracts “cardinal dates” from
the fitted curves.

1 2 3 4 5 6 |

`dat` |
a |

`method` |
either "weibull6" or "weibull4", |

`xstart` |
offset (day of year) for the "spring" peak; either a single numeric value for all years or a vector of the same length as number of samples, |

`xmin` |
left boundary (in day of year) of the integral under the curve, |

`xmax` |
right boundary (in day of year) of the integral under the curve, |

`quantile` |
two-sided quantile (percentage of integral) which defines beginning and end of the peak, |

`minpeak` |
minimum value of the total maximum which is regarded as peak (default value is derived from golden section), |

`mincut` |
minimum relative height of a pit compared to the lower of the two neighbouring maxima at which these maxima are regarded as separate peaks. |

`symmetric` |
if ( |

`p0` |
initial parameters for optimization. In case of |

`linint` |
control parameter to select interpolation behavior. Negative values (default) specify automatic selection heuristic, zero disables interpolation. A positive value is interpreted as mandatory interpolation time step. |

`maxit` |
maximum number of iterations passed to the optimisation functions, |

`findpeak` |
a logical value indicating whether the relevant peaks of the time series
should be identified automatically with |

`object` |
a result from a call to |

`file` |
file name where the data are to be written to, defaults to screen, |

`...` |
other parameters of |

This is a top-level function which calls `peakwindow`

,
`fitweibull`

and
`CDW`

for a series of data sets and returns
a table (`data frame`

) of all results.

A list with components:

`metares` |
data frame with cardinal dates and fitted parameters,
see |

`weibullfits` |
list of fit details for all fits,
see |

`weibull4`

,
`weibull6`

,
`fitweibull`

,
`peakwindow`

,
`CDW`

,
`cardidates`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ```
## open test data set (3 years) with 4 columns
## sample, x, y, flag
data(carditest)
dat <- carditest
## alternatively: import data from spreadsheet via the clipboard
# dat <- read.table("clipboard", sep = "\t", header = TRUE)
## or, for languages with comma as decimal separator:
# dat <- read.table("clipboard", sep = "\t", header = TRUE, dec = ",")
## Note: as.numeric recodes factor year to numeric value
plot(as.numeric(dat$sample)*365 + dat$x, dat$y, type = "b")
## do the analysis
tt <- metaCDW(dat, xstart = 55)
## plot results
par(mfrow=c(1, 3))
lapply(tt$weibullfits, plot)
## return table of results
summary(tt)
## Not run:
## copy to clipboard in spreadsheet compatible format
summary(tt, file = "clipboard", sep = "\t", quote = FALSE, row.names = FALSE)
## or, for languages with comma as decimal separator:
#summary(tt, file = "clipboard", sep = "\t", dec = ",",
# quote = FALSE, row.names = FALSE)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.