diff --git a/R/jsdgam.R b/R/jsdgam.R index 66114097..1fc0b162 100644 --- a/R/jsdgam.R +++ b/R/jsdgam.R @@ -195,7 +195,7 @@ #' geom_histogram() + #' facet_wrap(~ species, scales = 'free') #' -#' ggplot(dat, aes(x = lat, y = lon, col = log(count + 1))) + +#' ggplot(dat, aes(x = lon, y = lat, col = log(count + 1))) + #' geom_point(size = 2.25) + #' facet_wrap(~ species, scales = 'free') + #' scale_color_viridis_c() + @@ -209,7 +209,7 @@ #' #' # Each factor estimates a different nonlinear spatial process, using #' # 'by = trend' as in other mvgam State-Space models -#' factor_formula = ~ gp(lat, lon, k = 6, by = trend) - 1, +#' factor_formula = ~ gp(lon, lat, k = 6, by = trend) - 1, #' n_lv = 3, #' #' # The data and grouping variables @@ -230,7 +230,7 @@ #' #' # Each factor estimates a different nonlinear spatial process, using #' # 'by = trend' as in other mvgam State-Space models -#' factor_formula = ~ gp(lat, lon, k = 6, by = trend) - 1, +#' factor_formula = ~ gp(lon, lat, k = 6, by = trend) - 1, #' n_lv = 3, #' #' # Change default priors for fixed random effect variances and @@ -238,11 +238,11 @@ #' priors = c(prior(std_normal(), #' class = sigma_raw), #' prior(std_normal(), -#' class = `alpha_gp_trend(lat, lon):trendtrend1`), +#' class = `alpha_gp_trend(lon, lat):trendtrend1`), #' prior(std_normal(), -#' class = `alpha_gp_trend(lat, lon):trendtrend2`), +#' class = `alpha_gp_trend(lon, lat):trendtrend2`), #' prior(std_normal(), -#' class = `alpha_gp_trend(lat, lon):trendtrend3`)), +#' class = `alpha_gp_trend(lon, lat):trendtrend3`)), #' #' # The data and the grouping variables #' data = dat, @@ -303,7 +303,7 @@ #' #' # Plot the median log(count) predictions on a grid #' newdata$log_count <- preds[,1] -#' ggplot(newdata, aes(x = lat, y = lon, col = log_count)) + +#' ggplot(newdata, aes(x = lon, y = lat, col = log_count)) + #' geom_point(size = 1.5) + #' facet_wrap(~ species, scales = 'free') + #' scale_color_viridis_c() + diff --git a/docs/reference/code.html b/docs/reference/code.html index b9c7f095..2900bcb8 100644 --- a/docs/reference/code.html +++ b/docs/reference/code.html @@ -195,7 +195,7 @@
xts
or ts
objects)
-to the format necessary for mvgam
mvgam
sim_mvgam()
diff --git a/docs/reference/jsdgam-1.png b/docs/reference/jsdgam-1.png
index 21fbde03..6a3f8289 100644
Binary files a/docs/reference/jsdgam-1.png and b/docs/reference/jsdgam-1.png differ
diff --git a/docs/reference/jsdgam-2.png b/docs/reference/jsdgam-2.png
index d1d188ea..295c28ce 100644
Binary files a/docs/reference/jsdgam-2.png and b/docs/reference/jsdgam-2.png differ
diff --git a/docs/reference/jsdgam-3.png b/docs/reference/jsdgam-3.png
index 9da9a742..72dcba36 100644
Binary files a/docs/reference/jsdgam-3.png and b/docs/reference/jsdgam-3.png differ
diff --git a/docs/reference/jsdgam-4.png b/docs/reference/jsdgam-4.png
index 0c4e22a6..fa7baf27 100644
Binary files a/docs/reference/jsdgam-4.png and b/docs/reference/jsdgam-4.png differ
diff --git a/docs/reference/jsdgam-5.png b/docs/reference/jsdgam-5.png
index 27049f45..b9a1c8d4 100644
Binary files a/docs/reference/jsdgam-5.png and b/docs/reference/jsdgam-5.png differ
diff --git a/docs/reference/jsdgam-6.png b/docs/reference/jsdgam-6.png
index bf118a63..da5ea25f 100644
Binary files a/docs/reference/jsdgam-6.png and b/docs/reference/jsdgam-6.png differ
diff --git a/docs/reference/jsdgam-7.png b/docs/reference/jsdgam-7.png
index 93a04b8b..632f5407 100644
Binary files a/docs/reference/jsdgam-7.png and b/docs/reference/jsdgam-7.png differ
diff --git a/docs/reference/jsdgam-8.png b/docs/reference/jsdgam-8.png
index 13a0e6fe..1032dae2 100644
Binary files a/docs/reference/jsdgam-8.png and b/docs/reference/jsdgam-8.png differ
diff --git a/docs/reference/jsdgam-9.png b/docs/reference/jsdgam-9.png
index e5911e86..e0859065 100644
Binary files a/docs/reference/jsdgam-9.png and b/docs/reference/jsdgam-9.png differ
diff --git a/docs/reference/jsdgam.html b/docs/reference/jsdgam.html
index 439ddf1b..fd0a91b4 100644
--- a/docs/reference/jsdgam.html
+++ b/docs/reference/jsdgam.html
@@ -450,7 +450,7 @@ newdata = datagrid(cyl = c(4, 6))
: cyl
variable equal to 4 and 6 and other regressors fixed at their means or modes.
See the Examples section and the datagrid()
documentation.
subset()
call with a single argument to select a subset of the dataset used to fit the model, ex: newdata = subset(treatment == 1)
dplyr::filter()
call with a single argument to select a subset of the dataset used to fit the model, ex: newdata = filter(treatment == 1)
string:
"mean": Marginal Effects at the Mean. Slopes when each predictor is held at its mean or mode.
"median": Marginal Effects at the Median. Slopes when each predictor is held at its median or mode.
"marginalmeans": Marginal Effects at Marginal Means. See Details section below.