Learn R Programming

GWlasso (version 1.0.1)

plot.gwlfit: Plot method for gwlfit object

Description

Plot method for gwlfit object

Usage

# S3 method for gwlfit
plot(x, ...)

Value

a ggplot

Arguments

x

a gwlfit object returned by gwl_fit()

...

ellipsis for S3 method compatibility

Examples

Run this code

predictors <- matrix(data = rnorm(2500), 50,50)
y_value <- sample(1:1000, 50)
coords <- data.frame("Lat" = rnorm(50), "Long" = rnorm(50))
distance_matrix <- compute_distance_matrix(coords)

my.gwl.fit <- gwl_fit(bw = 20,
                      x.var = predictors, 
                      y.var = y_value,
                      kernel = "bisquare",
                      dist.mat = distance_matrix, 
                      alpha = 1, 
                      adaptive = TRUE, 
                      progress = TRUE,
                      nfolds = 5)

plot(my.gwl.fit)

Run the code above in your browser using DataLab