Phase Potrait with Data Trajectories for Specified Entities

Share:

Description

phaseportdat creates a phase portrait (velocity plot, vectorfield) based on the two differential equations that were considered to be the overall best models for indicator 1 and indicator 2. The user may specify entities for which he/she wants to plot the data trajectories over the phase portrait. It calls the function preprocess_data. It requires the packages plm, pracma, deSolve and graphics.

Usage

1
2
phaseportdat(dataset, xv, yv, rangeX, rangeY, f, entidx1, entidx2, entidx3, 
entidx4, entidx5, entidx6)

Arguments

dataset

a plm pdata.frame panel data frame.

xv

a reference to variable from the paneldata to be included as indicator 1 in the modeling procedure.

yv

a reference to variable from the paneldata to be included as indicator 2 in the modeling procedure.

rangeX

defines the range of the indicator 1.

rangeY

defines the range of the indicator 2.

f

a function that contains the models of the two indicators.

entidx1

index of an entity in the wide format data of a variable.

entidx2

index of an entity in the wide format data of a variable.

entidx3

index of an entity in the wide format data of a variable.

entidx4

index of an entity in the wide format data of a variable.

entidx5

index of an entity in the wide format data of a variable.

entidx6

index of an entity in the wide format data of a variable.

Author(s)

Viktoria Spaiser: viktoria.sp@web.de

Examples

1
2
3
4
5
## Phase Portrait with Data Trajectories with the following two models:
## dx/dt  = + 0.0012 /x^2 and dy/dt = + 0.0071 x^3

phaseportdat(datap, datap$logGDP, datap$EmanzV, seq(0, 1, by = 0.1), seq(0, 1, by = 0.1), 
f <- function(t,Y=c()) rbind(0.0012/Y[1]^2, + 0.0071*Y[1]^3), 1, 2, 4, 5, 7, 9)