rwalk {EviewsR} | R Documentation |
Simulate a random walk process using an EViews
engine.
Description
Use this function to simulate a random walk process using an EViews
engine from R, R Markdown or Quarto.
Usage
rwalk(
series = "",
wf = "",
page = "",
drift = NA,
rndseed = NA,
frequency = "",
start_date = "",
end_date = "",
num_cross_sections = NA,
num_observations = NA,
class = "df"
)
Arguments
series |
Names of series for the random walk. |
wf |
Object or a character string representing the name of a workfile to be created |
page |
Object or a character string representing the name of a workfile page to be created |
drift |
Numeric value as the drift term for random walk. |
rndseed |
Set the |
frequency |
Object or a character string representing the frequency of a workfile page to be created. Only letters accepted by EViews are allowed. For example |
start_date |
Object or a character string representing the |
end_date |
Object or a character string representing the |
num_cross_sections |
Optional integer value. Include |
num_observations |
Numeric value. Specify the number of observations if the |
class |
Class of the R object: |
Value
An EViews workfile
See Also
Other important functions:
EviewsR
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export_dataframe()
,
export()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
import()
,
set_eviews_path()
Examples
library(EviewsR)
## Not run:
# Simulate random walk and return as a dataframe object
rwalk(series="a b e",rndseed=12345,start_date = 1990,frequency="m",num_observations=100)
library(ggplot2)
ggplot(eviews$abe,aes(x=date))+geom_line(aes(y=a,color="a"))+
geom_line(aes(y=b,color="b"))+geom_line(aes(y=e,color="e"))+labs(colour='',x="",y="")
# To simulate random walk and return as an `xts` object
rwalk(series="X Y Z",rndseed=12345,start_date = 1990,frequency="m",num_observations=100,class="xts")
plot(eviews$xyz)
autoplot(eviews$xyz,facet="")+xlab("")
plot(eviews$XYZ)
# To simulate random walk series on existing workfile
eviews_wfcreate(wf="rwalk",page="rwalk",frequency="7",start_date=2020,end_date="2022")
rwalk(wf="rwalk",series="rw1 rw2 rw3",rndseed=12345,frequency="M")
head(eviews$rw1rw2rw3)
## End(Not run)