Title: | Pierre-Goldwin Correlogram |
---|---|
Description: | Goldwin-Pierre correlogram. Research of critical periods in the past. Integrates a time series in a given window. |
Authors: | Jean-Sebastien PIERRE [aut,cre] |
Maintainer: | J.S. Pierre <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.0 |
Built: | 2025-03-12 03:12:36 UTC |
Source: | https://github.com/cran/Rcriticor |
An integro delayed correlogram to find critical periods for a biological phenomenon driven by a climatic factor
critic(t, Y, fac = NULL, dinf = 10, durinf = 2, dsup = 90, dursup = 90, nperm = 0, nboot = 0, period = 365, dt = 1, seriesName = "year", grType = "image", roll = FALSE, alpha = 0.05,ps.print = FALSE)
critic(t, Y, fac = NULL, dinf = 10, durinf = 2, dsup = 90, dursup = 90, nperm = 0, nboot = 0, period = 365, dt = 1, seriesName = "year", grType = "image", roll = FALSE, alpha = 0.05,ps.print = FALSE)
t |
vector : The climatic time series. In this version, must be annual and sampled dayly. Its length must be a multiple of 365. February 29 must be discarded. |
Y |
vector : the observations to regress. Must be of the same length as the number of years in t. One observation per year if fac==NULL (the default). If fac is not null, there may be several observations per year. See |
fac |
factor grouping the observations per year. Its levels number must be equal to the number of years in |
dinf |
integer : the number of the day taken as first beginning period to scan in the year |
durinf |
numeric : the number of days taken as lower span of the periods to scan in the year |
dsup |
numeric : the number of the day taken as last beginning period to scan in the year |
dursup |
numeric : the number of days taken as largen span of the periods to scan in the year |
nperm |
numeric : number of random permutations |
nboot |
numeric : number of bootstrap subsamples |
period |
numeric : Number of time units per period. Default = 365 (days in a year) |
dt |
numeric : value of the time increment for integration. Default = 1 |
seriesName |
string : name of the replicates of the time series. Default = "year" |
grType |
type of map to draw. grType may take the values "image","contour","filledcontour","persp". These codes call the correspondig R base functions. |
roll |
logical : only used if grType=="persp" in what case the perspective plot rotates slowly to show all aspects of the perspective. |
alpha |
numeric: significance level for the tests. Default=0.05 |
ps.print |
logical: Pseudovalues of the bootstrap must be printed (TRUE) or not (FALSE). Default = FALSE |
For each replication (by default: year) calculates the sums of the time series t, begining at a time i varying from dinf to dsup, and ending a time varying from i+durinf to i+dursup. Then correlates these sums to the vector Y of independent observations. The result is the map rho[i,j] giving the correlation between Y and the corresponding sum of j elements (duration) after the time i. The significant level where the map can be cut is obtained by random permutations the number of which is defined by nperm. The confidence interval of the maximum correlation, as well as its bivariate confidence interval, are obtained by optional bootstrap. If nperm = 0 (default), no permutation is done. If nboot = 0, no bootstrap is done.
z : a matrix containing the correlation coefficients of Y with the sum of j days
Jean-Sebastien Pierre ; [email protected]
Pierre, J. S., Guillome, M. and Querrien, M. T. 1986. A Statistical and Graphic Method for Seeking in Which Periods of the Year Are the Animal Populations Peculiarly Sensitive to a Given Weather Component (Critical Periods of Time) - Application to the Case of Cereal Aphids. - Acta Oecologica-Oecologia Generalis 7: 365-380. (in french, english summary)
image
,contour
,filled.contour
,persp
for graphical representations.
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. data(time,wy) data(sit,time3) critic(t=time3,Y=sit,dinf=50,dsup=90,durinf=20,dursup=50)
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. data(time,wy) data(sit,time3) critic(t=time3,Y=sit,dinf=50,dsup=90,durinf=20,dursup=50)
factor "year" with seven levels, years 1974 to 1980
data(fac)
data(fac)
The format is: Factor with 7 levels "1974","1975",..,1980: 1 1 1 2 2 2 3 3 3 4 ...7
Pierre, J. S., Guillome, M. and Querrien, M. T. 1986. A Statistical and Graphic Method for Seeking in Which Periods of the Year Are the Animal Populations Peculiarly Sensitive to a Given Weather Component (Critical Periods of Time) - Application to the Case of Cereal Aphids. - Acta Oecologica-Oecologia Generalis 7: 365-380. (in french, english summary)
data(fac) print(fac)
data(fac) print(fac)
A function to inspect a point of the correlogram, to plot a scatterplot of dependent variable against the sum of the independent variable, and return the corresponding regression.
lookat(u, Y)
lookat(u, Y)
u |
An object of class |
Y |
numeric vector : the dependent variable |
This functions requires the display of a correlogram plot on the current device, and that it has been previously saved as an object of class criticor. It then calls the function locator
. The user has then to click on the correlogram at the point he wishes to inspect. A plot is then displayed on a new device, showing the scatterplot of the summed independent variable for the beginning of the series (Y axis on the correlogram) and the duration of the sum (X axis on the correlogram). Several point may be tried, only the results for the last one are returned by the function (see Value). The process stops when a left click outside the correlogram.
An object of class lm
1. The scatterplot is currently recovered by the correlogram, whose device is reactivated after drawing \ the scatterplot. You have to move the correlogram apart with the mouse to see the scatterplot.\ 2. lookat works only on correlograms drawn with the options image or contour The option filledcontour \ (calling filled.contour) gives erroneous results because its particular scale which is not accessible.\ It does not work at all with the option persp.
Jean-Sebastien Pierre ; [email protected]
Pierre, J. S., Guillome, M. and Querrien, M. T. 1986. A Statistical and Graphic Method for Seeking in Which Periods of the Year Are the Animal Populations Peculiarly Sensitive to a Given Weather Component (Critical Periods of Time) - Application to the Case of Cereal Aphids. - Acta Oecologica-Oecologia Generalis 7: 365-380. (in french, english summary)
critic
,locator
,image
,contour
,filled.contour
,persp
for graphical representations.
data(sit,time3) U=critic(t=time3,Y=sit,dinf=1,dsup=90,durinf=2,dursup=100) ## Not run: lookat(U,sit)
data(sit,time3) U=critic(t=time3,Y=sit,dinf=1,dsup=90,durinf=2,dursup=100) ## Not run: lookat(U,sit)
Maximum populations (log transformed) of the aphid sitobion avenae in wheat fields from 1975 to 1981
data(sit)
data(sit)
The format is: num [1:7] 2.08e-01 2.12 3.36e+01 1.08 9.99e-16 ...
Pierre, J. S., Guillome, M. and Querrien, M. T. 1986. A Statistical and Graphic Method for Seeking in Which Periods of the Year Are the Animal Populations Peculiarly Sensitive to a Given Weather Component (Critical Periods of Time) - Application to the Case of Cereal Aphids. - Acta Oecologica-Oecologia Generalis 7: 365-380. (in french, english summary)
data(sit) ## maybe str(sit) ; plot(sit) ...
data(sit) ## maybe str(sit) ; plot(sit) ...
Peak densities of the cereal aphid Sitobion avenae, from 1974 to 1980, three replicates per year. Intendid to be used with critic, together with fac
data(sit2)
data(sit2)
The format is: num [1:21] 0.34 -0.175 0.147 2.977 1.477 ...
Pierre, J. S., Guillome, M. and Querrien, M. T. 1986. A Statistical and Graphic Method for Seeking in Which Periods of the Year Are the Animal Populations Peculiarly Sensitive to a Given Weather Component (Critical Periods of Time) - Application to the Case of Cereal Aphids. - Acta Oecologica-Oecologia Generalis 7: 365-380. (in french, english summary)
data(sit2,fac) plot(fac,sit2) ## maybe str(sit2) ; plot(sit2) ...
data(sit2,fac) plot(fac,sit2) ## maybe str(sit2) ; plot(sit2) ...
Fictitious daily temperatures for 20 years, generated by rnorm
data(time)
data(time)
The format is: num [1:7300] 5.83 2.36 4.58 8.02 6.64 ...
data(time) ## maybe str(time) ; plot(time) ...
data(time) ## maybe str(time) ; plot(time) ...
mean daily temperature data in Rennes (France) from 1975 to 1981. february 29 of bissextile years discarded
data(time3)
data(time3)
The format is: num [1:2555] 1 2.3 1.7 6.1 1.9 5.2 8.9 10.5 8.4 6.3 ...
Pierre, J. S., Guillome, M. and Querrien, M. T. 1986. A Statistical and Graphic Method for Seeking in Which Periods of the Year Are the Animal Populations Peculiarly Sensitive to a Given Weather Component (Critical Periods of Time) - Application to the Case of Cereal Aphids. - Acta Oecologica-Oecologia Generalis 7: 365-380. (in french, english summary)
data(time3) ## maybe str(time3) ; plot(time3) ...
data(time3) ## maybe str(time3) ; plot(time3) ...
Series of fictitious observations linearly linked to a period of the series "time". Exact correlation.
data(wy)
data(wy)
The format is: num [1:20] 149 158 157 143 165 ...
data(wy) ## maybe str(wy) ; plot(wy) ...
data(wy) ## maybe str(wy) ; plot(wy) ...
Series of fictitious observations linearly linked to a period of the series "time". incomplete correlation. Normal noise added
data(wy2)
data(wy2)
The format is: num [1:20] 160 152 157 137 182 ...
data(wy2) ## maybe str(wy2) ; plot(wy2) ...
data(wy2) ## maybe str(wy2) ; plot(wy2) ...