You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
util_log_ts<-function(.time_series){
time_series<-.time_seriesmin_x<- min(time_series)
if (min_x>=0){
if (ts_adf_test(log(time_series))$p_value<0.05){
rlang::inform(
message="Logrithmic transformation made the time series stationary",
use_cli_format=TRUE
)
stationary_ts<- log(time_series)
# Returnreturn(
list(
stationary_ts=stationary_ts,
ndiffs=NA,
adf_stats= ts_adf_test(stationary_ts),
trans_type="log",
ret=TRUE
)
)
} else {
rlang::inform(
message="Logrithmic Transformation Failed.",
use_cli_format=TRUE
)
return(list(ret=FALSE))
}
} else {
rlang::inform(
message="The minimum value of the time series is less than or equal to 0.",
use_cli_format=TRUE
)
return(list(ret=FALSE))
}
}
Function:
Examples:
The text was updated successfully, but these errors were encountered: