dcc_spear: correlation analysis for tree ring chronologies and climate...

Description Usage Arguments Value Methods (by generic) Examples

View source: R/climatology.R

Description

A function similar to the functionality of dcc; without moving windows, but spearman correlations used.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
dcc_spear(
  crn,
  clim,
  months = c(-2:10),
  method = c("range", "mean", "sum"),
  replicates = 1000,
  conf = 0.95,
  ci.type = "perc"
)

## S3 method for class 'dcc_spear'
plot(x, ...)

Arguments

crn

A chronology - the first column is used by the function, make sure to give the right input (in case multiple chronologies are in one object, e.g. as for AR-chronologies).

clim

climate data in "wide format" with years in the first column and monthly climate measurement in the consecutive 12 columns.

months

an integer sequence selecting the end months of the windows to use. 1:5 selects jan to may of the "current" years as end months. to select months of the "previous" years use negative integers - c(-2:10) selects last years October to current years October as end months. Selection needs to be within c(-11:12).

method

a character string, 'range', 'mean' or 'sum', selecting whether to calculate the correlation with individual months, or with means or sums over all (by argument month) selected months of the climate data.

replicates

integer specifying the number of bootstrap replicates used to calculate the bootstrapped confidence interval.

conf

the confidence level to be used for the cor.test (represented by column p_value in the output and the bootstrapped confidence interval computation).

ci.type

type of confidence interval to be computed as defined as "type" in boot.ci.

x

an output object from function dcc_spear()

...

optional plotting arguments

Value

a data frame with following names:

coef

spearmans rho

p_value

p-values from calling cor.test - that is without taking multiplicity into account

ci_lower

lower bound of bootstrapped confidence interval

ci_upper

upper bound of bootstrapped confidence interval

Methods (by generic)

Examples

1
#not available in development version

konradmayer/trlboku documentation built on July 3, 2020, 9:49 p.m.