Learn R Programming

gmwm (version 2.0.0)

orderModel: Order the Model

Description

Orders the model and changes it to the correct format

Usage

orderModel(models)

Arguments

models
A vector of string that specifies the models

Details

If the models are c("AR1", "WN", "AR1", "WN", "AR1+WN+AR1+WN"), it will be converted to c("AR1-1", "WN-1", "AR1-2", "WN-2", "AR1+WN+AR1+WN").

This function is used in gen.lts()

Examples

Run this code
models = c("AR1", "WN", "AR1", "WN", "AR1+WN+AR1+WN")
new.models = orderModel(models)
new.models

models = c('AR1', 'QN', 'WN', 'AR1+QN+WN')
new.models = orderModel(models)
new.models

Run the code above in your browser using DataLab