require(knitr) require(formatR) require(dplyr) options(width=200) knitr::opts_chunk$set(cache=FALSE,prompt=FALSE,comment=">",message=FALSE,echo=TRUE,warning=FALSE,tidy=TRUE,strip.white=TRUE,size="small", fig.align = "center",fig.show='hold')
You can use R
or Matlab
to run RQA
analyses. This document is based on R
. Yoiu can find the assignments for Matlab
on Blackboard.
nlRtsa
First, download an install package nlRtsa
(under construction)
IMPORTANT!: Make sure you install the package to a library in directory in which you have write access. In the computer rooms at the university, the easiest way to make sure things run smoothly is to first use the
RStudio
menu on thePackages
pane to install a package, e.g.,devtools
.RStudio
will give you the option to install the package in your personal user directory.
require(devtools) install_github("FredHasselman/nlRtsa") library(nlRtsa)
If this does not work, run the following code:
require(devtools) source_url("https://raw.githubusercontent.com/FredHasselman/nlRtsa/master/filesource/nlRtsa_SOURCE.R")
This will source all the functions in nlRtsa
into your environment.
Drawback is that you cannot access the manual pages.
We'll package fractal
to reconstruct some phase spaces.
in.IT('fractal','rgl')
plot3d(lorenz)
X
lx <- lorenz[1:2048,1]
to reconstruct the phase space.
+ Find an optimal embedding lag using timeLag
, use method = "mutual"
.
+ Find the embeddingdimension, using FNN
+ Plot the phase space (use open3d()
to open an interactive plot if you like.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.