plot_sgstar: Timeseries Plot for Model

Description Usage Arguments Value Examples

View source: R/plot_sgstar.R

Description

Plotting line chart dataset and fit.values of the Seasonal GSTAR model.

Usage

1

Arguments

formula

an object from the output from sgstar() function.

Value

returns output a list that shown line chart for each location.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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)

sgstar documentation built on May 23, 2021, 5:06 p.m.