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
I have a dataset similar to the tutorial and I am trying to recreate the plot as the tutorial shows, but I am unable to do so for one input series (as opposed to having 2 data streams for S1 and L8 in the tutorial). It seems this is occurring for 2 main reasons:
There are numerous flags that are not captured by the algorithm
There is an error when it tries to plot, as if it's trying to merge two time series
I've tried going through the source code but I have been unable to understand why I'm unable to recreate the tutorial. Any advice you can give would be appreciated.
library(bayts)
pt1ts <- bfastts(data=dt$DI, dates=dt$date, type=c("irregular"))
plotts(tsL=list(pt1ts),labL=list("DI"))
Warning message:
In plot.xy(xy.coords(x, y), type = type, ...) :
"axes" is not a graphical parameter
Note that I receive this warning message multiple times regardless if I'm plotting or not. For example, you can see below.
pt_pdf <- c(c("gaussian","gaussian"),c(preMean,preSD),c(postMean,postSD))
Warning messages:
1: In doTryCatch(return(expr), name, parentenv, handler) :
"axes" is not a graphical parameter
2: In doTryCatch(return(expr), name, parentenv, handler) :
"axes" is not a graphical parameter
Run the bayts function
It is notable here that the actual disturbances that occur are not flagged by the algorithm. In this case, I know the date of disturbance as 2019-01-20, and we can see this in the PNF below. However, there is no record of change in PChange or Flag.
plotBayts(bts$bayts)
Error in merge.zoo(zoo(coredata(x), tt), zoo(, tt2)) :
series cannot be merged with non-unique index entries in a series
In addition: Warning messages:
1: In min(which(bayts$Flag == "Flag")) :
no non-missing arguments to min; returning Inf
2: In `[.zoo`(bayts, min(which(bayts$Flag == "Flag"))) :
NAs introduced by coercion to integer range
3: In zoo(data, 1900 + as.POSIXlt(dates)$year + (yday365(dates) - 1)/365, :
some methods for “zoo” objects do not work if the index entries in ‘order.by’ are not unique
4: In zoo(coredata(x), tt) :
some methods for “zoo” objects do not work if the index entries in ‘order.by’ are not unique
Plotting here does not work. The error message appears to suggest that there is a timeseries that is being merged with the one I supplied, but there are duplicates even though I've already removed the Leap Day (29 Feb 2016). This also is confusing for Error messages 3 and 4.
The text was updated successfully, but these errors were encountered:
I have a dataset similar to the tutorial and I am trying to recreate the plot as the tutorial shows, but I am unable to do so for one input series (as opposed to having 2 data streams for S1 and L8 in the tutorial). It seems this is occurring for 2 main reasons:
I've tried going through the source code but I have been unable to understand why I'm unable to recreate the tutorial. Any advice you can give would be appreciated.
Data
The data I'm using is attached here: testBaytsData.txt
I am using R 3.6.3
Code with associated output
Data set-up
Create the timeseries
Note that I receive this warning message multiple times regardless if I'm plotting or not. For example, you can see below.
Run the bayts function
Plot the function
Plotting here does not work. The error message appears to suggest that there is a timeseries that is being merged with the one I supplied, but there are duplicates even though I've already removed the Leap Day (29 Feb 2016). This also is confusing for Error messages 3 and 4.
The text was updated successfully, but these errors were encountered: