Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 10f1aa2

Browse filesBrowse files
committed
Preparing v0.2
1 parent 4a5f454 commit 10f1aa2
Copy full SHA for 10f1aa2

4 files changed

+9-6Lines changed: 9 additions & 6 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎DESCRIPTION‎

Copy file name to clipboardExpand all lines: DESCRIPTION
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: meshed
22
Type: Package
33
Title: Bayesian Regression with Meshed Gaussian Processes
44
Version: 0.2
5-
Date: 2021-10-06
5+
Date: 2022-01-24
66
Author: Michele Peruzzi
77
Maintainer: Michele Peruzzi <michele.peruzzi@duke.edu>
88
Description: Fits Bayesian spatial or spatiotemporal multivariate regression models based on latent Meshed Gaussian Processes (MGP) as described in Peruzzi, Banerjee, Finley (2020) <doi:10.1080/01621459.2020.1833889> and Peruzzi, Banerjee, Dunson, and Finley (2021) <arXiv:2101.03579>. Funded by ERC grant 856506 and NIH grant R01ES028804.
Collapse file

‎R/spmeshed.map.r‎

Copy file name to clipboardExpand all lines: R/spmeshed.map.r
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ spmeshed.map <- function(y, x, coords, k=NULL,
333333

334334
lambda_values <- lambda_mask
335335

336-
start_w <- matrix(rnorm(nrow(simdata_in)*k), nrow = nrow(simdata_in), ncol = k)
336+
start_w <- matrix(0, nrow = nrow(simdata_in), ncol = k)
337337
}
338338

339339
# finally prepare data
Collapse file

‎R/spmeshed.r‎

Copy file name to clipboardExpand all lines: R/spmeshed.r
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spmeshed <- function(y, x, coords, k=NULL,
2020
mcmcsd=.05, mcmc_startfrom=0),
2121
debug = list(sample_beta=TRUE, sample_tausq=TRUE,
2222
sample_theta=TRUE, sample_w=TRUE, sample_lambda=TRUE,
23-
verbose=FALSE, debug=FALSE, dag=1),
23+
verbose=FALSE, debug=FALSE),
2424
indpart=FALSE
2525
){
2626

@@ -61,7 +61,7 @@ spmeshed <- function(y, x, coords, k=NULL,
6161
saving <- settings$saving %>% set_default(TRUE)
6262
low_mem <- settings$low_mem %>% set_default(FALSE)
6363

64-
debugdag <- debug$dag %>% set_default(1)
64+
debugdag <- 1#debug$dag %>% set_default(1)
6565

6666
coords %<>% as.matrix()
6767

Collapse file

‎man/spmeshed.Rd‎

Copy file name to clipboardExpand all lines: man/spmeshed.Rd
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spmeshed(y, x, coords, k=NULL,
1616
verbose = 0,
1717
predict_everywhere = FALSE,
1818
settings = list(adapting=TRUE, forced_grid=NULL,
19-
cache=NULL, ps=TRUE, saving=TRUE, low_mem=FALSE),
19+
cache=NULL, ps=TRUE, saving=TRUE, low_mem=FALSE, hmc=4),
2020
prior = list(beta=NULL, tausq=NULL, sigmasq = NULL,
2121
phi=NULL, a=NULL, nu = NULL,
2222
toplim = NULL, btmlim = NULL, set_unif_bounds=NULL),
@@ -65,7 +65,7 @@ This parameter is ignored if \code{settings$forced_grid=FALSE} in which case the
6565

6666
\item{predict_everywhere}{bool used if settings$forced_grid=T. Should predictions be made at the reference grid locations? If not, predictions will be made only at the supplied NA values of Y.}
6767

68-
\item{settings}{list: \code{settings$adapting} turns the adaptation of MCMC on/off, \code{settings$forced_grid} determines whether or not to use the data grid or a forced grid; if unspecified, the function will try to see what the data look like. Note: if \code{forced_grid=FALSE} and \eqn{n} is very large and \eqn{coords} are irregularly spaced, then expect slowdowns in preprocessing and consider using \code{forced_grid=TRUE} instead. \code{settings$saving} will save model data if set to \code{TRUE}. \code{settings$low_mem} will only save \code{beta_mcmc}, \code{lambda_mcmc}, \code{v_mcmc}, \code{tausq_mcmc} (and not \code{w_mcmc} and \code{lp_mcmc}, which can be recovered from the others), thereby using less memory. All fitted predictions remain available in \code{yhat_mcmc} for convenience. \code{settings$ps} (default \code{TRUE}) determines whether to use the PS parametrization (Peruzzi et al 2021). \code{settings$hmc}, used if any outcome is not Gaussian, (1: MALA, 2: NUTS, 3: RM-MALA, 4: (default) Simplified RM-MALA)}
68+
\item{settings}{list: \code{settings$adapting} turns the adaptation of MCMC on/off, \code{settings$forced_grid} determines whether or not to use the data grid or a forced grid; if unspecified, the function will try to see what the data look like. Note: if \code{forced_grid=FALSE} and \eqn{n} is very large and \eqn{coords} are irregularly spaced, then expect slowdowns in preprocessing and consider using \code{forced_grid=TRUE} instead. \code{settings$saving} will save model data if set to \code{TRUE}. \code{settings$low_mem} will only save \code{beta_mcmc}, \code{lambda_mcmc}, \code{v_mcmc}, \code{tausq_mcmc} (and not \code{w_mcmc} and \code{lp_mcmc}, which can be recovered from the others), thereby using less memory. All fitted predictions remain available in \code{yhat_mcmc} for convenience. \code{settings$ps} (default \code{TRUE}) determines whether to use the PS parametrization (Peruzzi et al 2021). \code{settings$hmc}, used if any outcome is not Gaussian, (1: MALA, 2: NUTS, 3: RM-MALA, 4: Simplified manifold preconditioning (default))}
6969

7070
\item{prior}{list: setup for priors of unknown parameters. \code{prior$phi} needs to be specified as the support of the Uniform prior for \eqn{\phi}. There is currently limited functionality here and some inputs are currently ignored. Defaults are: a vague Gaussian for \eqn{\beta}, \eqn{\tau^2_i \sim IG(2,1)}, \eqn{\theta_j \sim IG(2,2)}, all subject to change.}
7171

@@ -103,6 +103,9 @@ where \eqn{y(s)} is a \eqn{q}-dimensional vector of outcomes at spatial location
103103
104104
Peruzzi, M., Banerjee, S., Dunson, D.B., and Finley, A.O. (2021)
105105
Grid-Parametrize-Split (GriPS) for Improved Scalable Inference in Spatial Big Data Analysis. \url{https://arxiv.org/abs/2101.03579}
106+
107+
Peruzzi, M. and Dunson, D.B. (2022)
108+
Spatial meshing for general Bayesian multivariate models. \url{https://arxiv.org/abs/}
106109
}
107110
108111
\author{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.