Type: | Package |
Title: | Pierre-Goldwin Correlogram |
Version: | 2.0 |
Date: | 2018-04-03 |
Author: | Jean-Sebastien PIERRE [aut,cre] |
Maintainer: | J.S. Pierre <jean-sebastien.pierre@univ-rennes1.fr> |
Depends: | R (≥ 3.2.0) |
Description: | Goldwin-Pierre correlogram. Research of critical periods in the past. Integrates a time series in a given window. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
LazyLoad: | yes |
NeedsCompilation: | no |
Packaged: | 2018-03-09 18:36:35 UTC; jpierre |
Repository: | CRAN |
Date/Publication: | 2018-03-10 16:39:10 UTC |
Pierre - Goldwin correlogram
Description
An integro delayed correlogram to find critical periods for a biological phenomenon driven by a climatic factor
Usage
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)
Arguments
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 |
Details
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.
Value
z : a matrix containing the correlation coefficients of Y with the sum of j days
Author(s)
Jean-Sebastien Pierre ; jean-sebastien.pierre@univ-rennes1.fr
References
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)
See Also
image
,contour
,filled.contour
,persp
for graphical representations.
Examples
##---- 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"
Description
factor "year" with seven levels, years 1974 to 1980
Usage
data(fac)
Format
The format is: Factor with 7 levels "1974","1975",..,1980: 1 1 1 2 2 2 3 3 3 4 ...7
Source
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)
Examples
data(fac)
print(fac)
Looking at the correlogram
Description
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.
Usage
lookat(u, Y)
Arguments
u |
An object of class |
Y |
numeric vector : the dependent variable |
Details
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.
Value
An object of class lm
Warning
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.
Author(s)
Jean-Sebastien Pierre ; jean-sebastien.pierre@univ-rennes1.fr
References
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)
See Also
critic
,locator
,image
,contour
,filled.contour
,persp
for graphical representations.
Examples
data(sit,time3)
U=critic(t=time3,Y=sit,dinf=1,dsup=90,durinf=2,dursup=100)
## Not run: lookat(U,sit)
Cereal aphids in Rennes
Description
Maximum populations (log transformed) of the aphid sitobion avenae in wheat fields from 1975 to 1981
Usage
data(sit)
Format
The format is: num [1:7] 2.08e-01 2.12 3.36e+01 1.08 9.99e-16 ...
Source
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)
Examples
data(sit)
## maybe str(sit) ; plot(sit) ...
Sitobion with replicates
Description
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
Usage
data(sit2)
Format
The format is: num [1:21] 0.34 -0.175 0.147 2.977 1.477 ...
Source
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)
Examples
data(sit2,fac)
plot(fac,sit2)
## maybe str(sit2) ; plot(sit2) ...
Fictitious daily temperatures
Description
Fictitious daily temperatures for 20 years, generated by rnorm
Usage
data(time)
Format
The format is: num [1:7300] 5.83 2.36 4.58 8.02 6.64 ...
Examples
data(time)
## maybe str(time) ; plot(time) ...
mean daily temperature data in Rennes (France)
Description
mean daily temperature data in Rennes (France) from 1975 to 1981. february 29 of bissextile years discarded
Usage
data(time3)
Format
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 ...
Source
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)
Examples
data(time3)
## maybe str(time3) ; plot(time3) ...
Series of fictitious observations
Description
Series of fictitious observations linearly linked to a period of the series "time". Exact correlation.
Usage
data(wy)
Format
The format is: num [1:20] 149 158 157 143 165 ...
Examples
data(wy)
## maybe str(wy) ; plot(wy) ...
Series of fictitious observations
Description
Series of fictitious observations linearly linked to a period of the series "time". incomplete correlation. Normal noise added
Usage
data(wy2)
Format
The format is: num [1:20] 160 152 157 137 182 ...
Examples
data(wy2)
## maybe str(wy2) ; plot(wy2) ...