# Note: The file creations in this examples were deactivated in the current examples
# because of CRAN policies.
# For saving all equations in a MS word document, \strong{docx}.
# The directory can be added alongside of the file name.
# For Windows OS directories could be written as \ not /.
# Here the tempdir() function is used to get a temporary directory path.
# Users can replace this with their desired directory path.
# \donttest{
writemath(y~x+z+asym(v)+asymL(q+a),tempfile(fileext = ".docx"))
# }
# For Markdown file the extenssion of the file should be assigned as \strong{md}.
# \donttest{
writemath(y~x+z+asym(v+w)+asymL(q+a)+asymS(m),tempfile(fileext = ".md"))
# }
# All equations are able to be saved in a PDF file.
# \donttest{
writemath(y~x+z+asym(v+w)+asymL(q+a)+asymS(m),tempfile(fileext = ".pdf"))
# }
# Following commad saves LibreOffice formulas in terminal.
# Copy and paste formulas there and after selecting related formula click on formula icon.
kardl_model<-kardl(imf_example_data,CPI~ER+PPI+asym(ER)+deterministic(covid)+trend,mode=c(1,2,3,0))
# Following command writes all equations in a latex file in current directory.
# Note: The file creations in this examples were deactivated because of CRAN policies.
# \donttest{
tmp <- tempfile(fileext = ".tex")
writemath(kardl_model,tmp)
# }
# For printing the equations in Latex fomrat assignning of file name to 1 is required.
# A user's formula can be written directly in the function.
eq1 <- writemath(y~x+z+asym(v+w)+asymL(q+a)+asymS(m),1)
# To get all of the N/ARDL equations (in LaTeX format):
# Note: Here the output is limited to 1000 characters for better visibility.
print(eq1,1000)
# To saving outputs for different output type, in a list is available.
eq2 <- writemath(y~x+z+asym(v+w)+asymL(q+a)+asymS(m),1)
# To get the equations' subcomponents, here the long-run equation (in LaTeX format):
eq2$formulas$longRunEqFormula
# For printing the equations in Markdown fomrat assignning of file name to 2 is required.
eq3<- writemath(y~x+z+asym(v+w)+asymL(q+a)+asymS(m),2)
# To get the ECM equation (in Markdown format):
eq3$formulas$ECMEqFormula
# For printing the equations in OpenOffice fomrat assignning of file name to 3 is required.
eq4<-writemath(y~x+z+asym(v+w)+asymL(q+a)+asymS(m),3)
# To get the NARDL equation (in LibreOffice format):
eq4$formulas$NARDL_eq_Formula
Run the code above in your browser using DataLab