^{1}

^{2}

^{3}

The authors have declared that no competing interests exist.

Spatial data are ubiquitous in everyday life and the scientific literature. As such, it is becoming increasingly important to properly analyze spatial data. Spatial data can be analyzed using a statistical model that explicitly incorporates the spatial dependence among nearby observations. Incorporating this spatial dependence can be challenging, but ignoring it often yields poor statistical models that incorrectly quantify uncertainty, impacting the validity of hypothesis tests, confidence intervals, and predictions intervals.

Several

The rest of this article is organized as follows. We first give a brief theoretical introduction to spatial linear models. We then outline the variety of methods used to estimate the parameters of spatial linear models. Next we explain how to obtain predictions at unobserved locations. Following that, we detail some advanced modeling features, including random effects, partition factors, anisotropy, and big data approaches. Finally we end with a short discussion.

Before proceeding, we install

We create visualizations using ggplot2 [

We also show code that can be used to create interactive visualizations of spatial data with

Statistical linear models are often parameterized as

The model in

The

One way to define

Sometimes each element in the weight matrix

In this section, we show how to use the

–

If

In the following subsections, we use the point-referenced

We can learn more about

Log zinc concentration can be viewed interactively in

Generally the covariance parameters (

We estimate parameters of a spatial linear model regressing log zinc concentration (

^{~}log_dist2road, moss, spcov_type = “exponential”)

We summarize the model fit by running

^{~}log_dist2road, data = moss, spcov_type = “exponential”) Residuals: Min 1Q Median 3Q Max −2.6801 −1.3606 −0.8103 −0.2485 1.1298 Coefficients (fixed): Estimate Std. Error z value Pr(>|z|) (Intercept) 9.76825 0.25216 38.74 <2e–16 *** log_dist2road −0.56287 0.02013 −27.96 <2e–16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Pseudo R-squared: 0.683 Coefficients (exponential spatial covariance): de ie range 3.595e-01 7.897e-02 8.237e+03

The fixed effects coefficient table contains estimates, standard errors, z-statistics, and asymptotic p-values for each fixed effect. From this table, we notice there is evidence that mean log zinc concentration significantly decreases with distance from the haul road (p-value < 2e-16). We see the fixed effect estimates by running

The model summary also contains the exponential spatial covariance parameter estimates, which we can view by running

The dependent random error variance (

The open circle at a distance of zero represents the

The quality of model fit can be assessed using a variety of statistics readily available in

Roughly 68% of the variability in log zinc is explained by log distance from the road. The pseudo R-squared can be adjusted to account for the number of explanatory variables using the

The next two model-fit statistics we consider are the AIC and AICc that [

The AIC and AICc are given by

Suppose we want to quantify the difference in model quality between the spatial model and a non-spatial model using the AIC and AICc criteria. We fit a non-spatial model (

^{~}log_dist2road, moss, spcov_type = “none”)

This model is equivalent to one fit using

The noticeably lower AIC and AICc of of the spatial model indicate that it is a better fit to the data than the non-spatial model. Recall that these AIC and AICc comparisons are valid because both models are fit using restricted maximum likelihood (the default).

Another approach to comparing the fitted models is to perform leave-one-out cross validation [

The noticeably lower mean-squared-prediction error of the spatial model indicates that it is a better fit to the data than the non-spatial model.

In addition to model fit metrics,

An observation is said to have high leverage if its combination of explanatory variable values is far from the mean vector of the explanatory variables. For a non-spatial model, the leverage of the ^{−1/2}^{−1/2} is the inverse square root of the covariance matrix,

Larger hat values indicate more leverage, and observations with large hat values may be unusual and warrant further investigation.

The fitted value of an observation is the estimated mean response given the observation’s explanatory variable values and the model fit:

Fitted values for the spatially dependent random errors (

The residuals measure each response’s deviation from its fitted value. The response residuals are given by

The response residuals are typically not directly checked for linear model assumptions, as they have covariance closely resembling the covariance of ^{−1/2} yields the Pearson residuals [

The covariance of _{p} is (_{p} by the respective diagonal element of (

or

When the model is correct, the standardized residuals have mean zero, variance one, and are uncorrelated.

It is common to check linear model assumptions through visualizations. We can visualize the standardized residuals vs fitted values by running

When the model is correct, the standardized residuals should be evenly spread around zero with no discernible pattern. We can visualize a normal QQ-plot of the standardized residuals by running

When the standardized residuals are normally distributed, they should closely follow the normal QQ-line.

An observation is said to be influential if its omission has a large impact on model fit. Typically, this is measured using Cook’s distance [

For a spatial model, the Cook’s distance of the

The Cook’s distance versus leverage (hat values) can be visualized by running

Though we described the model diagnostics in this subsection using

The

This tibble format makes it easy to pull out the coefficient names, estimates, standard errors, z-statistics, and p-values from the

The

The

Finally, the

By default, only the columns of

Next we use the

^{~}2 −0.282 ((1037002 1039492, 1037006

^{~}3 −0.00121 ((1070158 1030216, 1070185

^{~}4 0.0354 ((1054906 1034826, 1054931

^{~}5 −0.0160 ((1025142 1056940, 1025184

^{~}6 0.0872 ((1026035 1044623, 1026037

^{~}7 −0.266 ((1100345 1060709, 1100287

^{~}8 0.0743 ((1030247 1029637, 1030248

^{~}9 NA ((1043093 1020553, 1043097

^{~}10 −0.00961 ((1116002 1024542, 1116002

^{~}# … with 52 more rows

We can learn more about the data by running

We can visualize the distribution of log seal trends in the

Polygons are gray if seal trends are missing.

Log trends can be viewed interactively in

The gray polygons denote areas where the log trend is missing. These missing areas need to be kept in the data while fitting the model to preserve the overall neighborhood structure.

We estimate parameters of a spatial autoregressive model for log seal trends (

^{~}1, seal, spcov_type = “car”)

If a weight matrix is not provided to

We summarize, tidy, glance at, and augment the fitted model by running

^{~}1, data = seal, spcov_type = “car”) Residuals: Min 1Q Median 3Q Max −0.34443 −0.10405 0.04422 0.07349 0.20487 Coefficients (fixed): Estimate Std. Error z value Pr(>|z|) (Intercept) −0.07102 0.02495 −2.846 0.00443 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Coefficients (car spatial covariance): de range extra 0.03261 0.41439 0.02221 R> tidy(sealmod) # A tibble: 1 x 5 term estimate std.error statistic p.value <chr> <dbl> <dbl> <dbl> <dbl> 1 (Intercept) −0.0710 0.0250 −2.85 0.00443 R> glance(sealmod) # A tibble: 1 x 9 n p npar value AIC AICc logLik deviance pseudo.r.squared <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> 1 34 1 3 −36.9 −30.9 −30.1 18.4 32.9 0 R> augment(sealmod) Simple feature collection with 34 features and 6 fields Geometry type: POLYGON Dimension: XY Bounding box: xmin: 980001.5 ymin: 1010815 xmax: 1116002 ymax: 1145054 Projected CRS: NAD83 / Alaska Albers # A tibble: 34 x 7 log_trend .fitted .resid .hat .cooksd .std.resid * <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> 1 −0.282 −0.0710 −0.211 0.0179 0.0233 −1.14 2 −0.00121 −0.0710 0.0698 0.0699 0.0412 0.767 3 0.0354 −0.0710 0.106 0.0218 0.0109 0.705 4 −0.0160 −0.0710 0.0550 0.0343 0.00633 0.430 5 0.0872 −0.0710 0.158 0.0229 0.0299 1.14 6 −0.266 −0.0710 −0.195 0.0280 0.0493 −1.33 7 0.0743 −0.0710 0.145 0.0480 0.0818 1.30 8 −0.00961 −0.0710 0.0614 0.0143 0.00123 0.293 9 −0.182 −0.0710 −0.111 0.0131 0.0155 −1.09 10 0.00351 −0.0710 0.0745 0.0340 0.0107 0.561 # … with 24 more rows, and 1 more variable: # geometry <POLYGON [m]>

Note that for

In this section, we show how to use

We first visualize the distribution of the sulfate data (

In A (top), observed sulfate is visualized. In B (bottom), sulfate predictions are visualized.

We then fit a spatial linear model for sulfate using an intercept-only model with a spherical spatial covariance function by running

^{~}1, sulfate, spcov_type = “spherical”)

Then we obtain best linear unbiased predictions (Kriging predictions) using

We can visualize the model predictions (

It is important to properly specify the

Prediction standard errors are returned by setting the

The

If

The

Previously we used the

We then view the first few rows of

Here

An alternative (but equivalent) approach can be used for model fitting and prediction that circumvents the need to keep

We can then fit a spatial linear model by running

^{~}1, + sulfate_with_NA, + spcov_type = “spherical” + )

The missing values are ignored for model-fitting but stored in

We can then predict the missing values by running

The call to

We can also use

Unlike

For areal data models fit with

We can also use

We may desire to fix specific spatial covariance parameters at a particular value. Perhaps some parameter value is known, for example. Or perhaps we want to compare nested models where a reduced model uses a fixed parameter value while the full model estimates the parameter. Fixing spatial covariance parameters while fitting a model is possible using the

As an example, suppose our goal is to compare a model with an exponential covariance and dependent error variance, independent error variance, and range parameter to a similar model that instead assumes the independent random error variance parameter (nugget) is zero. First, the

The

^{~}log_dist2road, moss, spcov_initial = init)

Notice that because the

The lower AIC and AICc of the full model compared to the reduced model indicates that the independent random error variance is important to the model. A likelihood ratio test comparing the full and reduced models is also possible using

Another application of fixing spatial covariance parameters involves calculating their profile likelihood confidence intervals [_{i}, the _{i} such that _{i} and optimizing over the remaining parameters, _{−i}, and _{i}. Because computing profile likelihood confidence intervals requires refitting the model many times for different fixed values of _{i}, it can be computationally intensive. This approach can be generalized to yield joint profile likelihood confidence intervals cases when

Fitting multiple models is possible with a single call to

^{~}1, + sulfate, + spcov_type = c(“exponential”, “spherical”, “none”) + )

Then

And

Currently,

Non-spatial random effects incorporate additional sources of variability into model fitting. They are accommodated in

The first example explores random intercepts for the

^{~}log_dist2road, + moss, + spcov_type = “exponential”, + random =

^{~}sample + )

Note that ^{~} sample^{~} (1 | sample)

The second example adds a random intercept for

^{~}log_dist2road, + moss, + spcov_type = “exponential”, + random =

^{~}sample + (log_dist2road

^{|}year) + )

Note that ^{~} sample + (log_dist2road | year)^{~} (1 | sample) + (log_dist2road | year)

We can compare the AIC of all three models by running

The

It is possible to fix random effect variances using the

A partition factor is a variable that allows observations to be uncorrelated when they are from different levels of the partition factor. Partition factors are specified in

^{~}log_dist2road, + moss, + spcov_type = “exponential”, + partition_factor =

^{~}year + )

An isotroptic spatial covariance function (for point-referenced data) behaves similarly in all directions (i.e., is independent of direction) as a function of distance. An anisotropic covariance function does not behave similarly in all directions as a function of distance. Consider the spatial covariance imposed by an eastward-moving wind pattern. A one-unit distance in the x-direction likely means something different than a one-unit distance in the y-direction.

In A (left), the isotropic covariance function is visualized. In B (right), the anisotropic covariance function is visualized. The black outline of each ellipse is a level curve of equal correlation.

Accounting for anisotropy involves a rotation and scaling of the x-coordinates and y-coordinates such that the spatial covariance function that uses these transformed distances is isotropic. We use the

^{~}log_dist2road, + moss, + spcov_type = “exponential”, + anisotropy = TRUE + ) R> summary(spmod_anis) Call: splm(formula = log_Zn

^{~}log_dist2road, data = moss, spcov_type = “exponential”, anisotropy = TRUE) Residuals: Min 1Q Median 3Q Max −2.5279 −1.2239 −0.7202 −0.1921 1.1659 Coefficients (fixed): Estimate Std. Error z value Pr(>|z|) (Intercept) 9.54798 0.22291 42.83 <2e-16 *** log_dist2road −0.54601 0.01855 −29.44 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Pseudo R-squared: 0.7048 Coefficients (exponential spatial covariance): de ie range rotate scale 3.561e-01 6.812e-02 8.732e+03 2.435e+00 4.753e-01 attr(,“class”) [1] “exponential”

The

Note that specifying an initial value for

The

We set a reproducible seed and then simulate data at 3000 random locations in the unit square using the spatial covariance parameters in

We can visualize the simulated data (

In A (top), spatial data are simulated in the unit square. A spatial linear model is fit using the default big data approximation for model-fitting. In B (bottom), predictions are made using the fitted model and the default big data approximation for prediction.

There is noticeable spatial patterning in the response variable (

Note that the output from

The computational cost associated with model fitting is exponential in the sample size for all estimation methods. For maximum likelihood and restricted maximum likelihood, the computational cost of estimating

To show how to use

The

Big data are most simply accommodated by setting

^{~}1, + sim_data, + spcov_type = “exponential”, + xcoord = x, + ycoord = y, + local = TRUE + ) R> summary(local1) Call: splm(formula = resp

^{~}1, data = sim_data, spcov_type = “exponential”, xcoord = x, ycoord = y, local = TRUE) Residuals: Min 1Q Median 3Q Max −5.0356 −1.3514 −0.1468 1.2842 6.5381 Coefficients (fixed): Estimate Std. Error z value Pr(>|z|) (Intercept) −1.021 0.699 −1.46 0.144 Coefficients (exponential spatial covariance): de ie range 2.8724 0.9735 0.2644

Instead of using

^{~}1, + sim_data, + spcov_type = “exponential”, + xcoord = x, + ycoord = y, + local = local2_list + ) R> summary(local2) Call: splm(formula = resp

^{~}1, data = sim_data, spcov_type = “exponential”, xcoord = x, ycoord = y, local = local2_list) Residuals: Min 1Q Median 3Q Max −4.98801 −1.30386 −0.09927 1.33176 6.58567 Coefficients (fixed): Estimate Std. Error z value Pr(>|z|) (Intercept) −1.0683 0.1759 −6.073 1.25e-09 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Coefficients (exponential spatial covariance): de ie range 2.5434 0.9907 0.2312

Likelihood-based statistics like

For point-referenced data,

The

The simplest way to accommodate big data prediction is to set

The predictions are visualized (

They display a similar pattern as the observed data.

Instead of using

This code implies that uniquely for each location requiring prediction, only the 30 observations in the data closest to it (in terms of Euclidean distance) are used in the computation and parallel processing is used with two cores.

For areal data, no local neighborhood approximation exists because of the data’s underlying neighborhood structure. Thus, all of the data must be used to compute predictions and by consequence,

We appreciate feedback from users regarding

We would like to thank the editor and anonymous reviewers for their feedback which greatly improved the manuscript.

The views expressed in this manuscript are those of the authors and do not necessarily represent the views or policies of the U.S. Environmental Protection Agency or the National Oceanic and Atmospheric Administration. Any mention of trade names, products, or services does not imply an endorsement by the U.S. government, the U.S. Environmental Protection Agency, or the National Oceanic and Atmospheric Administration. The U.S. Environmental Protection Agency and the National Oceanic and Atmospheric Administration do not endorse any commercial products, services or enterprises.

PONE-D-22-28137spmodel: spatial statistical modeling and prediction in RPLOS ONE

Dear Dr. Dumelle,

Thank you for submitting your manuscript to PLOS ONE. After careful consideration, we feel that it has merit but does not fully meet PLOS ONE’s publication criteria as it currently stands. Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised during the review process.

Please submit your revised manuscript by Feb 25 2023 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at

Please include the following items when submitting your revised manuscript:

A rebuttal letter that responds to each point raised by the academic editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'.

A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.

An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.

We look forward to receiving your revised manuscript.

Kind regards,

A. K. M. Anisur Rahman, Ph.D.

Academic Editor

PLOS ONE

Journal Requirements:

When submitting your revision, we need you to address these additional requirements.

1. Please ensure that your manuscript meets PLOS ONE's style requirements, including those for file naming. The PLOS ONE style templates can be found at

2. Please review your reference list to ensure that it is complete and correct. If you have cited papers that have been retracted, please include the rationale for doing so in the manuscript text, or remove these references and replace them with relevant current references. Any changes to the reference list should be mentioned in the rebuttal letter that accompanies your revised manuscript. If you need to cite a retracted article, indicate the article’s retracted status in the References list and also include a citation and full reference for the retraction notice.

Reviewers' comments:

Reviewer's Responses to Questions

1. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: Yes

Reviewer #2: Yes

**********

2. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: Yes

Reviewer #2: Yes

**********

3. Have the authors made all data underlying the findings in their manuscript fully available?

The

Reviewer #1: Yes

Reviewer #2: Yes

**********

4. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

**********

5. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: sp: spatial statistical modelling and prediction in R

PONE-D-22-28137

General comments

It was a pleasure to review this manuscript. The authors clearly and concisely described the functionality of their R package, spmodel, and provided well-considered examples. I was impressed with the breadth of functionality that spmodel provides including spatial autoregressive and geostatistical models, anisotrophy, prediction, random effects, partitioning, simulation, and functions to handle modelling and prediction of big data. There are a few packages that provide a subset of this functionality, but I don’t know of any that provide all of it. The syntax is similar to lm(), which will make it familiar to almost anyone who has used R and the inclusion of the broom functions make it intuitive to everyone familiar with tidy. The paper provides a nice balance of showing the package functionality and explaining how to interpret the outputs (effective range, AIC, etc.), making it accessible to readers with different levels of statistical experience. I was very excited to see a few examples of interactive maps in the paper and have no doubt that readers will want to recreate these visualisations. I was able to run all of the R code without error and all of the helpfiles I looked at were informative and complete. I didn’t review the technical details document, but I appreciate that the authors provided that additional resource. I’ve made some minor suggestions below about how to improve the manuscript, but my recommendation is to accept.

Minor suggestions:

Data are always plural. Change ‘data is’ to ‘data are’ throughout, with the exception of the object named ‘data’.

Introduction: Suggest mentioning INLA in review of R packages used for modelling point-referenced and areal data. I believe INLA and rstan can be used to model both, but in both cases the unique object structure and syntax leads to a fairly significant learning curve for new users.

Lines 238-239: I suggest reminding the reader that both models are fit using the default estimation method, REML, and so AIC and AICc are both valid for model comparison. Alternatively, you could add the estmethod = "reml" to the function call to make it more obvious.

Line 271: This sentence about leverage feels incomplete compared to the explanation given to other functions and outputs. I suggest adding something to the effect of ‘large leverage values indicate that an observation may be an outlier and warrant further investigation’, without going into too much detail. Later I see that leverage is mentioned again in lines 302-303 and Cooks D vs leverage is plotted. Another alternative is to add a sentence here telling readers how to interpret the plot.

Lines 274-276: I suggest including an example call to help here, which users will need to do if they’d like to change the type in the fitted function. I had trouble figuring out that the function was named fitted.spmod. I may have missed it in the help file and manuscript, but I don’t see where it says the output of splm is an object of class “spmod” – that would have helped here.

Line 296, 317, 388, 399, 558, 647, 697: Unindent so that it is part of the previous paragraph.

Lines 412-443. – output from spautor: It would be helpful to add a sentence or three about the output. For example, where is the autocorrelation parameter estimate? I noticed that the pseudo.r.squared is 0. Am I correct in my interpretation that this model has a really poor model fit? Or does it return 0 because there are no covariates in the model?

Lines 471-478: And the same factor levels if variables are factors?

Predict function: It looks like the results are returned in different formats (vector, list), depending on the se.fit and interval arguments. It would be worthwhile to mention this here so that people know to refer to the help file, which explains this clearly. I also suggest including the example with augment (lines 495-500) in the help file, as well as the manuscript. It’s really helpful.

Line 667: then is used twice in this sentence – awkward.

Random Effects section: I really appreciate all of the examples the authors included and the additional descriptions they’ve provided about how to set up random effects. This is going to be very helpful for users who are either unfamiliar with R or come from a non-statistical background.

Line 724: Incomplete sentence.

Line 810: typo – ‘and’ is repeated twice.

Lines 869-884: Are the indices mentioned in lines 869-871 used to define the groups mentioned in lines 880-883? I assume that the local parameter list defines the groups and the indices are the labels?

Reviewer #2: This paper describes the main functionalities of the R package “spmodel”, designed to analyze point-referenced and areal data using a common framework and syntax structure. The package allows to fit several geostatistical models for point-referenced data through the splm() function, and both SAR and CAR models for spatial areal data through the spautor() function. Different estimation methods are also available (restricted maximum likelihood, maximum likelihood, semivariogram weighted least squares and semivariogram composite likelihood) to obtain point estimates of the fixed effects and covariance parameters of the spatial linear model. Finally, the paper describes additional features of the package such as model-fit statistics, diagnostic metrics and spatial interpolation (or Kriging) among others.

The manuscript is well written and clearly describes the main functionalities of the package, including as supplementary material the data and R code to reproduce the results shown in the paper.

My major concerns are described below:

1) Redaction style:

Clearly, the manuscript is written following the style of a paper submitted to “Journal of Statistical Software” or “The R Journal”. I am not member of the Editorial Board of PLOS ONE, so I do not see myself qualified to judge whether the current style of the manuscript is appropriate to be published in this journal.

2) Introduction:

Very few references are included in the first part of the introduction section and most of them are packages/papers written by the authors of the present manuscript. Please, include additional references to spatial random sampling and statistical analysis of spatial data (as for example, [1]).

When reviewing the existing R packages to analyze and estimate areal data, I suggest the authors to include also the “diseasemapping” [2] and “bigDM” [3] packages. Additional packages for disease mapping and areal data analysis can be found in the CRAN Task View “Analysis of Spatial Data” (

3) Additional comment:

Perhaps the authors want to update the manuscript by including some of the new features from the current version (0.2.0) of the “spmodel” package.

References:

[1] Banerjee, S., Carlin, B. P., & Gelfand, A. E. (2003). Hierarchical Modeling and Analysis for Spatial Data. Chapman and Hall/CRC.

[2] Brown, P. E. (2015). Model-based geostatistics the easy way. Journal of Statistical Software, 63, 1-24.

[3] Adin, A., Orozco-Acosta, E., and Ugarte, M.D. (2022). bigDM: scalable Bayesian disease mapping models for high-dimensional data.

**********

6. PLOS authors have the option to publish the peer review history of their article (

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Reviewer #1: No

Reviewer #2: No

**********

[NOTE: If reviewer comments were submitted as an attachment file, they will be attached to this email and accessible via the submission site. Please log into your account, locate the manuscript record, and check for the action link "View Attachments". If this link does not appear, there are no attachment files.]

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool,

Please see the attached review_response.pdf for all of the relevant review comments. Thanks.

Submitted filename:

PONE-D-22-28137R1spmodel: spatial statistical modeling and prediction in RPLOS ONE

Dear Dr. Dumelle,

Thank you for submitting your manuscript to PLOS ONE. After careful consideration, we feel that it has merit but does not fully meet PLOS ONE’s publication criteria as it currently stands. Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised during the review process.

Please submit your revised manuscript by Mar 30 2023 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at

Please include the following items when submitting your revised manuscript:

A rebuttal letter that responds to each point raised by the academic editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'.

A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.

An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.

Kind regards,

A. K. M. Anisur Rahman, Ph.D.

Academic Editor

PLOS ONE

Journal Requirements:

Please review your reference list to ensure that it is complete and correct. If you have cited papers that have been retracted, please include the rationale for doing so in the manuscript text, or remove these references and replace them with relevant current references. Any changes to the reference list should be mentioned in the rebuttal letter that accompanies your revised manuscript. If you need to cite a retracted article, indicate the article’s retracted status in the References list and also include a citation and full reference for the retraction notice.

Reviewers' comments:

Reviewer's Responses to Questions

1. If the authors have adequately addressed your comments raised in a previous round of review and you feel that this manuscript is now acceptable for publication, you may indicate that here to bypass the “Comments to the Author” section, enter your conflict of interest statement in the “Confidential to Editor” section, and submit your "Accept" recommendation.

Reviewer #1: All comments have been addressed

Reviewer #2: (No Response)

**********

2. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: (No Response)

Reviewer #2: Yes

**********

3. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: (No Response)

Reviewer #2: Yes

**********

4. Have the authors made all data underlying the findings in their manuscript fully available?

The

Reviewer #1: (No Response)

Reviewer #2: Yes

**********

5. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: (No Response)

Reviewer #2: Yes

**********

6. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: (No Response)

Reviewer #2: The authors have made a comprehensive revision of the present manuscript and all my comments have been addressed.

I have no substantive comments, just a couple of small details that I describe below:

1) Page 2, first paragraph: Please, correct the name of the R-INLA package (instead of R-inla) and use the same letter font for the bigDM package

2) References section: Check the capital letters in the titles/journal names of some references such as [11], [16] or [40]

**********

7. PLOS authors have the option to publish the peer review history of their article (

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Reviewer #1: No

Reviewer #2: No

**********

[NOTE: If reviewer comments were submitted as an attachment file, they will be attached to this email and accessible via the submission site. Please log into your account, locate the manuscript record, and check for the action link "View Attachments". If this link does not appear, there are no attachment files.]

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool,

I have attached relevant responses to the reviewer comments in the review_responses.pdf document attached as part of this submission.

Submitted filename:

spmodel: spatial statistical modeling and prediction in R

PONE-D-22-28137R2

Dear Dr. Dumelle,

We’re pleased to inform you that your manuscript has been judged scientifically suitable for publication and will be formally accepted for publication once it meets all outstanding technical requirements.

Within one week, you’ll receive an e-mail detailing the required amendments. When these have been addressed, you’ll receive a formal acceptance letter and your manuscript will be scheduled for publication.

An invoice for payment will follow shortly after the formal acceptance. To ensure an efficient process, please log into Editorial Manager at

If your institution or institutions have a press office, please notify them about your upcoming paper to help maximize its impact. If they’ll be preparing press materials, please inform our press team as soon as possible -- no later than 48 hours after receiving the formal acceptance. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact

Kind regards,

A. K. M. Anisur Rahman, Ph.D.

Academic Editor

PLOS ONE

Additional Editor Comments (optional):

Reviewers' comments:

<quillbot-extension-portal></quillbot-extension-portal>

PONE-D-22-28137R2

spmodel: spatial statistical modeling and prediction in R

Dear Dr. Dumelle:

I'm pleased to inform you that your manuscript has been deemed suitable for publication in PLOS ONE. Congratulations! Your manuscript is now with our production department.

If your institution or institutions have a press office, please let them know about your upcoming paper now to help maximize its impact. If they'll be preparing press materials, please inform our press team within the next 48 hours. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information please contact

If we can help with anything else, please email us at

Thank you for submitting your work to PLOS ONE and supporting open access.

Kind regards,

PLOS ONE Editorial Office Staff

on behalf of

Dr. A. K. M. Anisur Rahman

Academic Editor

PLOS ONE