Biology Reference
In-Depth Information
correlation matrix (or equivalently, a vector of means and a covariance matrix)
are provided by the researcher. In addition, a few optional parameters can be
specified: (1) a vector of autocorrelations to induce autocorrelations into each
series; (2) a random seed for ensuring repeatability of generation; and (3) the
length of the series to be generated.
A covariance matrix is created from the variance vector and the correlation
matrix. If there is no autocorrelation, the covariance matrix is used to gener-
ate a series of independent multivariate normal random data. In the presence
of non-zero autocorrelation, the covariance matrix is used to generate the
first day of data, and each subsequent day of data are then generated from
the conditional multivariate normal distribution given counts on the previ-
ous day. This maintains the same covariance overall but also includes auto-
correlation. Specifically, we represent the vector of values on k series at day t
X
µ
1
,
t
1
, with mean
=
µ
=
as
and covariance matrix . The bivariate
X
t
X
µ
kt
,
k
X + and
is
distribution of
t
X
1
,
t

X
X
µ
µ
,
Σ
C
=
,
X
X
t
kt
,
: N

C
Σ
(2.1)
t
+
1
11
,+
t
X
kt
,+
1
where C is a diagonal matrix with elements ci ( i = 1, … , k ) on the diagonal,
where ci = Cov ( Xi , t , Xi , t + 1 ) is the lag-1 autocovariance of series i . Then, given
the values on day t , the conditional distribution of the next day (with the
given covariance and autocovariance C ) is

XX N
|
:
(
µ Σ
, ,
)
(2.2)
t
+
t
( )
 
where
Σ 1 and * = - C -1 C T .
Data generated from this conditional distribution provide a multivariate
dataset with the given means, covariance, and autocorrelation structure.
The next step is to add effects such as DOW and seasonality to the ini-
tial data. To do that, we first “label” the initial data by creating indicators
for DOW, day, month, and year. Now each day of data has a calendar date
attached to it.
µ µ
=+
C
µ
X t
Search WWH ::




Custom Search