Learn R Programming

climwin (version 1.2.3)

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)

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.

Examples

Run this code
# NOT RUN {
# 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