Learn R Programming

climwin (version 1.2.31)

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

Description

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

Usage

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

Value

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

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.

Author

Liam D. Bailey and Martijn van de Pol

Examples

Run this code

# 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) 

Run the code above in your browser using DataLab