Skip to content

Commit

Permalink
ma and cor methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Clark committed Nov 1, 2023
1 parent 8249be0 commit c63ffe1
Show file tree
Hide file tree
Showing 157 changed files with 1,300 additions and 1,029 deletions.
32 changes: 16 additions & 16 deletions R/RW.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
#' @rdname RW
#' @export
RW = function(ma = FALSE, cor = FALSE){
if(ma){
stop('Moving average terms not yet supported for RW models',
call. = FALSE)
}
if(cor){
stop('Correlated errors not yet supported for RW models',
call. = FALSE)
}
# if(ma){
# stop('Moving average terms not yet supported for RW models',
# call. = FALSE)
# }
# if(cor){
# stop('Correlated errors not yet supported for RW models',
# call. = FALSE)
# }
out <- structure(list(trend_model = 'RW',
ma = ma,
cor = cor,
Expand All @@ -37,14 +37,14 @@ RW = function(ma = FALSE, cor = FALSE){
#' @rdname RW
#' @export
AR = function(p = 1, ma = FALSE, cor = FALSE){
if(ma){
stop('Moving average terms not yet supported for AR models',
call. = FALSE)
}
if(cor){
stop('Correlated errors not yet supported for AR models',
call. = FALSE)
}
# if(ma){
# stop('Moving average terms not yet supported for AR models',
# call. = FALSE)
# }
# if(cor){
# stop('Correlated errors not yet supported for AR models',
# call. = FALSE)
# }
validate_pos_integer(p)
if(p > 3){
stop("Argument 'p' must be <= 3",
Expand Down
Loading

0 comments on commit c63ffe1

Please sign in to comment.