pvalue: Determine the probability that a given climate signal is...

Description Usage Arguments Value Author(s) Examples

View source: R/pvalue.R

Description

Calculate probability that a given climate signal is 'true' using either PDAICc or Pc.

Usage

1
pvalue(dataset, datasetrand, metric, sample.size)

Arguments

dataset

A dataframe containing information on all fitted climate windows. Output from slidingwin.

datasetrand

A dataframe containing information on all fitted climate windows using randomised data. Output from randwin.

metric

"AIC" or "C". Determine whether a value of PDAICc or Pc will be returned.

sample.size

Sample size of analysis.

Value

Returns a value representing the probability that a given climate window result is a false positive.

Author(s)

Liam D. Bailey and Martijn van de Pol

Examples

1
2
3
4
5
6
7
8
9
# Calculate PDAICc for the Mass dataset

pvalue(datasetrand = MassRand, dataset = MassOutput, 
      metric = "AIC", sample.size = 47)
      
# Calculate Pc for the Mass dataset

pvalue(datasetrand = MassRand, dataset = MassOutput,
      metric = "C", sample.size = 47) 

climwin documentation built on July 1, 2020, 7:04 p.m.