-
Notifications
You must be signed in to change notification settings - Fork 0
/
Area_documentation-example.R
39 lines (30 loc) · 1.06 KB
/
Area_documentation-example.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# library(CTmeta)
## Example 1 ##
##################################################################################################
# Input needed in examples below with q=2 variables.
# I will use the example matrices stored in the package:
DeltaT <- 1
Phi <- myPhi[1:2, 1:2]
# or: Drift
DeltaT <- 1
Drift <- myDrift
##################################################################################################
Area(DeltaT = DeltaT, Phi = Phi)
# or
Area(DeltaT, Phi)
# or, since DeltaT = 1
Area(Phi = Phi)
# If you would use the drift matrix Drift as input, then use:
Area(DeltaT, Drift = Drift)
# If, for instance, the time-interval range from 1 to 2 should be inspected (and not 0 to infinity), then use:
Area(DeltaT, Phi, t_min = 1, t_max = 2)
# Note that the function 'PhiPlot' can help for visualization of the curves in the Phi(DeltaT)-plot.
PhiPlot(DeltaT, Phi)
## Example 2: input from fitted object of class "varest" ##
#
data <- myData
if (!require("vars")) install.packages("vars")
library(vars)
out_VAR <- VAR(data, p = 1)
DeltaT <- 1
Area(DeltaT, out_VAR)