plot_sgstar {sgstar} | R Documentation |
Timeseries Plot for Model
Description
Plotting line chart dataset and fit.values of the Seasonal GSTAR model.
Usage
plot_sgstar(formula)
Arguments
formula |
an object from the output from sgstar() function. |
Value
returns output a list that shown line chart for each location.
Examples
library(sgstar)
data("coords")
data("simulatedata")
#create weight matrix using distance inverse matrix
z<-dist(coords,method = "euclidean")
z <- as.matrix(z)
matriksd <- 1/z
matriksd[is.infinite(matriksd)] <- 0
matriksd_w <- matriksd / rowSums(as.data.frame(matriksd))
fit <- sgstar(data = simulatedata, w = matriksd_w, p = 2,ps = 1, s =4)
plot1 <- plot_sgstar(fit)
[Package sgstar version 0.1.2 Index]