Description Usage Arguments Value Author(s) Examples
This function allows you to simulate MARX processes based on different underlying distribution.
1 | sim.marx(dist.eps, dist.x, obs, c_par, nc_par, exo_par)
|
dist.eps |
vector containing the error distribution and its parameters (options: t, normal, stable). |
dist.x |
vector containing the distribution of x and its parameters (options: t, normal, stable). Specify NULL or "not" if not wanted. |
obs |
Number of observations for simulated process. |
c_par |
vector of causal parameters. |
nc_par |
vector of noncausal parameters. |
exo_par |
Parameter of the exogenous variable. |
y |
Simulated data y. |
x |
Simulated data x (exogenous variable). |
Sean Telg
1 2 3 4 5 6 7 | dist.eps <- c('t',1,1) ## t-distributed errors with 1 degree of freedom and scale parameter 1
dist.x <- c('normal',0,1) ## standard normally distributed x variable
obs <- 100
c_par <- c(0.2,0.4)
nc_par <- 0.8
exo_par <- 0.5
sim.marx(dist.eps,dist.x,obs,c_par,nc_par,exo_par) ## Simulates a MARX(2,1,1) process
|
$y
[1] 57.70826399 60.71268953 44.31973097 45.03002379 42.10631401
[6] 45.04393618 50.41463408 57.96439382 56.13657649 64.70738906
[11] 73.17807571 89.66028631 49.20552928 51.11964575 36.20136872
[16] 30.52849611 24.21784547 22.51624113 19.44752937 14.39660716
[21] 13.31884110 16.00230598 18.19635493 28.12660176 31.90269589
[26] 41.47627907 49.21509850 61.54973584 78.59110779 96.61435915
[31] 117.66186149 143.81051685 176.15250743 100.98038152 98.50707674
[36] 69.18006256 56.92465192 43.03768681 37.11208389 26.38319291
[41] 23.89279997 20.03423217 18.30739638 18.28485568 13.79881771
[46] 8.45742446 5.99050936 3.67242830 2.06164605 1.20585137
[51] -0.14946545 0.08696855 -2.52436299 -2.41578219 -4.62763896
[56] -4.84644841 -7.68942591 -9.80398007 -13.54699903 -15.84717963
[61] -9.57836906 -13.84414176 -12.14093607 -18.56028569 -21.52334305
[66] -10.76731936 -13.18525300 -11.60180651 -16.49360345 -15.27593268
[71] -21.11126802 -22.83289465 -29.64838969 -33.45080377 -21.05101910
[76] -22.23139071 -17.20525908 -16.56986468 -13.15579244 -12.70584965
[81] -11.91538022 -9.52736495 -8.94588766 -7.60694791 -8.36241103
[86] 0.73639851 0.32160178 6.39332846 9.38802099 15.50356651
[91] 8.46828581 9.08214916 8.36417799 7.89197873 8.26555239
[96] 6.95836715 3.77579226 5.72893853 0.38331733 3.84894331
$x
[1] -1.26955196 -1.06300673 -1.71241868 -0.46010022 -0.10258792 0.17122895
[7] 3.28215892 -1.51967886 0.33293492 -0.21515447 -1.91715138 0.47852010
[13] 0.57799276 -0.53564032 0.94638411 -0.88610033 -0.05044124 1.27383491
[19] -1.12826962 0.50366505 -0.88710221 0.37140649 -0.13223392 0.43352186
[25] 0.98732923 1.35046062 -1.09361760 -0.54888240 0.66042560 0.13989968
[31] 1.19636031 -0.35927417 -0.21562215 0.16227156 -0.18538721 -1.72286748
[37] -0.79844114 0.37285401 0.59163539 -1.46875944 0.35013159 -0.46633919
[43] -1.25915399 -1.17073333 -1.24593797 -0.64868222 -0.44150184 -2.00376326
[49] 0.10824788 0.27405233 -1.39811431 0.76886019 0.08359211 -0.02402492
[55] -1.86070825 1.15467647 0.63569617 0.91760624 -1.82261441 1.45232185
[61] 1.28128920 0.10014904 1.09168343 0.95755309 -0.93358993 0.14865132
[67] 0.01015553 0.21735992 -1.66692327 2.16788346 0.58971850 1.66375626
[73] -1.77396086 1.59687727 0.35669409 -0.38365228 1.63068238 1.31416995
[79] -0.07373302 -0.47100992 -0.44591724 -0.69407700 -0.81177395 -0.56552446
[85] -0.33794411 -0.11452747 -1.25350848 0.04483264 -1.11756084 0.04040616
[91] 1.13956171 -0.11382763 2.19258601 -1.03643379 0.47969073 0.33763595
[97] -0.34416028 -0.27836373 -0.32496433 0.41861042
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.