diff --git a/DESCRIPTION b/DESCRIPTION index e8fbde4..85b1bc0 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,20 +1,20 @@ Package: INLABMA -Version: 0.1-11 -Date: 2018-07-26 -Encoding: latin1 +Version: 0.1-12 +Date: 2023-11-17 +Encoding: UTF-8 Title: Bayesian Model Averaging with INLA -Author: Virgilio Gómez-Rubio , Roger Bivand -Maintainer: Virgilio Gómez-Rubio +Author: Virgilio Gómez-Rubio , Roger Bivand +Maintainer: Virgilio Gómez-Rubio Depends: R(>= 2.15.0), parallel, sp -Imports: Matrix, spdep +Imports: Matrix, spdep, methods Suggests: INLA Description: Fit Spatial Econometrics models using Bayesian model averaging on models fitted with INLA. The INLA package can be obtained from - . + . License: GPL (>= 2) Additional_repositories: https://inla.r-inla-download.org/R/stable/ RoxygenNote: 6.0.1 NeedsCompilation: no -Packaged: 2018-07-26 08:37:52 UTC; virgiliogomezgislab +Packaged: 2023-11-17 20:54:25 UTC; virgil Repository: CRAN -Date/Publication: 2018-07-26 22:10:06 UTC +Date/Publication: 2023-11-18 14:20:05 UTC diff --git a/MD5 b/MD5 index cefbe86..183d1ff 100644 --- a/MD5 +++ b/MD5 @@ -1,20 +1,21 @@ -fab8cb3bd22e34dbd417ce8da61496dd *DESCRIPTION -67d4ad58c745526e171b5edebd6b8f40 *NAMESPACE +635ed034fef8f02b85d1713e32f62010 *DESCRIPTION +6c90ea8ba339f92c37b6e72075b94367 *NAMESPACE e732fab3d0996e4cc221b7be3c792819 *R/BMArho.R -b7f4d3d0932b259376e98cbf5b33aae8 *R/INLAMH.R +da2beeb5856abdf2d14066ecabe638bf *R/INLAMH.R 9770042bbcd031588531e09472a3eabc *R/SAC.R 072bb1b56f7e5562a57b845db96ec8ee *R/SE-utils.R 5855c97d0b73ad7c8d20e95eab75dfd5 *R/leroux.R -176ccd894f1bb9d9f8a5953159bc1c92 *inst/CITATION -c4b99dec6bd03be7898317d73189d046 *man/BMA2.Rd -415194a38807dc78f5583ad02a0a99d2 *man/BMArho.Rd -02c9389c46d8c1a5b3d80d8b20558f46 *man/INLAMH.Rd -9d0a2d3960c4900ff25de005d2b78157 *man/fitmarg.Rd -e01ddd8f763c02bec7bb12a29f38c602 *man/fitmargBMA.Rd -42034b79cdb898bd4aaaeafeb946662e *man/leroux.Rd -98b442e9d2c0934facf6316af1192c09 *man/logprrho.Rd -56e9b1cb8daa634e0ae3be54b04ffd3c *man/mysplinefun.Rd -b9b53e3712948efee16de1e1905f0268 *man/recompute.impacts.Rd -8b7be27a8f31e427f57024a486a677f5 *man/rescalemarg.Rd -14137ea3c0b26263fb915bbf5321d76b *man/sem.Rd -ef553c7e01dde2f3a1e39c5b341e7e4b *man/trIrhoWinv.Rd +8faf250d78a120ba4c7ea2186efddd24 *build/partial.rdb +790b6ab8c3e8c065c0a388af84bf1cd5 *inst/CITATION +97ce55be27ecf9aa48548688abe50d4a *man/BMA2.Rd +ae73926a7e555bcf328156b133b1152b *man/BMArho.Rd +18359f39f80d45912e4b7dc6fd736c32 *man/INLAMH.Rd +e4d31f27b13d9c15825225da34473fde *man/fitmarg.Rd +30afc3be3ef494765d8da9e120b06650 *man/fitmargBMA.Rd +bd4dbcd4d5bce2bf71eb2f4fc31c4142 *man/leroux.Rd +6e9046314704e5b2c5ce01f9f058096b *man/logprrho.Rd +9d38199338e160b7dc20b1caab1ac076 *man/mysplinefun.Rd +8cb1085acfb83e846b48b866a85eb9bb *man/recompute.impacts.Rd +d68655ade8f3672fbee7a55e664741d4 *man/rescalemarg.Rd +1846e157a6f5b0439ad7acc1bb8808bd *man/sem.Rd +2ec6d9f645e8465fa89a70adab6e6b80 *man/trIrhoWinv.Rd diff --git a/NAMESPACE b/NAMESPACE index cd7af9e..3518656 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -12,3 +12,5 @@ import(spdep) importFrom("stats", "as.formula", "dnorm", "integrate", "model.matrix", "runif", "splinefun", "update", "quantile") + +importFrom("methods", "is") diff --git a/R/INLAMH.R b/R/INLAMH.R index 08be306..5b92ac4 100644 --- a/R/INLAMH.R +++ b/R/INLAMH.R @@ -43,7 +43,7 @@ while (i <= n.sim.tot) { #Fit model using try to handle possible errors in INLA model.new <- try(fit.inla(d, b.new)) - if(class(model.new) == "try-error") { + if(is(model.new, "try-error")) { #Update number of errors n.err.idx <- n.err.idx + 1 diff --git a/build/partial.rdb b/build/partial.rdb new file mode 100644 index 0000000..581bc26 Binary files /dev/null and b/build/partial.rdb differ diff --git a/inst/CITATION b/inst/CITATION index b1ee440..fd37764 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -1,8 +1,8 @@ citHeader("To cite INLABMA in publications use:") -citEntry(entry = "Article", +bibentry(bibtype = "Article", title = "Spatial Data Analysis with {R}-{INLA} with Some Extensions", - author = personList(as.person("Roger S. Bivand"), + author = c(as.person("Roger S. Bivand"), as.person("Virgilio G\\'omez-Rubio"), as.person("H{\\aa}vard Rue")), journal = "Journal of Statistical Software", @@ -10,12 +10,12 @@ citEntry(entry = "Article", volume = "63", number = "20", pages = "1--31", - url = "http://www.jstatsoft.org/v63/i20/", + url = "https://www.jstatsoft.org/v63/i20/", textVersion = paste("Roger S. Bivand, Virgilio Gomez-Rubio, Havard Rue (2015).", "Spatial Data Analysis with R-INLA with Some Extensions.", "Journal of Statistical Software, 63(20), 1-31.", - "URL http://www.jstatsoft.org/v63/i20/.") + "URL https://www.jstatsoft.org/v63/i20/.") ) diff --git a/man/BMA2.Rd b/man/BMA2.Rd index 4a395db..52d36b4 100644 --- a/man/BMA2.Rd +++ b/man/BMA2.Rd @@ -45,7 +45,7 @@ summary information. %% ~put references to the literature/web site here ~ %%} \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~ @@ -60,11 +60,11 @@ Virgilio G %%} \references{ - Roger S. Bivand, Virgilio Gómez-Rubio, Håvard Rue (2014). Approximate + Roger S. Bivand, Virgilio Gómez-Rubio, Hĺvard Rue (2014). Approximate Bayesian inference for spatial econometrics models. Spatial Statistics, Volume 9, 146-165. - Roger S. Bivand, Virgilio Gómez-Rubio, Håvard Rue (2015). Spatial + Roger S. Bivand, Virgilio Gómez-Rubio, Hĺvard Rue (2015). Spatial Data Analysis with R-INLA with Some Extensions. Journal of Statistical Software, 63(20), 1-31. URL http://www.jstatsoft.org/v63/i20/. } diff --git a/man/BMArho.Rd b/man/BMArho.Rd index 125f467..6ae94e1 100644 --- a/man/BMArho.Rd +++ b/man/BMArho.Rd @@ -35,7 +35,7 @@ Vector of averaged fitted values. %% ~put references to the literature/web site here ~ %%} \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~ @@ -50,11 +50,11 @@ Virgilio G % R documentation directory. \references{ - Roger S. Bivand, Virgilio Gómez-Rubio, Håvard Rue (2014). Approximate + Roger S. Bivand, Virgilio Gómez-Rubio, Hĺvard Rue (2014). Approximate Bayesian inference for spatial econometrics models. Spatial Statistics, Volume 9, 146-165. - Roger S. Bivand, Virgilio Gómez-Rubio, Håvard Rue (2015). Spatial + Roger S. Bivand, Virgilio Gómez-Rubio, Hĺvard Rue (2015). Spatial Data Analysis with R-INLA with Some Extensions. Journal of Statistical Software, 63(20), 1-31. URL http://www.jstatsoft.org/v63/i20/. } diff --git a/man/INLAMH.Rd b/man/INLAMH.Rd index 785c751..7bfd81e 100644 --- a/man/INLAMH.Rd +++ b/man/INLAMH.Rd @@ -64,10 +64,10 @@ has been accepted or not. This is useful to compute the acceptance rate.} a list beacuse the sampled values can be vectors.} } \references{ -Virgilio Gómez-Rubio and Håvard Rue (2017). Markov Chain Monte Carlo with the Integrated Nested Laplace Approximation. \url{https://arxiv.org/abs/1210.4908}. +Virgilio Gómez-Rubio and Haavard Rue (2017). Markov Chain Monte Carlo with the Integrated Nested Laplace Approximation. \doi{10.1007/s11222-017-9778-y}. } \author{ -Virgilio Gómez-Rubio. +Virgilio Gómez-Rubio. } %%\examples{ diff --git a/man/fitmarg.Rd b/man/fitmarg.Rd index 7490183..7042afe 100644 --- a/man/fitmarg.Rd +++ b/man/fitmarg.Rd @@ -40,7 +40,7 @@ A function with the fitted marginal is returned. %% ~put references to the literature/web site here ~ %%} \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~ diff --git a/man/fitmargBMA.Rd b/man/fitmargBMA.Rd index 342684e..19d4eb4 100644 --- a/man/fitmargBMA.Rd +++ b/man/fitmargBMA.Rd @@ -68,7 +68,7 @@ distribution. %% ~put references to the literature/web site here ~ %%} \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~ diff --git a/man/leroux.Rd b/man/leroux.Rd index dfd3466..ace6ff4 100644 --- a/man/leroux.Rd +++ b/man/leroux.Rd @@ -49,7 +49,7 @@ The marginal log-likelihood is corrected to add half the log-determinant of the An INLA object. } \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~ @@ -67,11 +67,11 @@ Virgilio G (eds.), Statistical Models in Epidemiology, the Environment and Clinical Trials, pp. 135-178. Springer-Verlag, New York. - Roger S. Bivand, Virgilio Gómez-Rubio, Håvard Rue (2014). Approximate + Roger S. Bivand, Virgilio Gómez-Rubio, Hĺvard Rue (2014). Approximate Bayesian inference for spatial econometrics models. Spatial Statistics, Volume 9, 146-165. - Roger S. Bivand, Virgilio Gómez-Rubio, Håvard Rue (2015). Spatial + Roger S. Bivand, Virgilio Gómez-Rubio, Hĺvard Rue (2015). Spatial Data Analysis with R-INLA with Some Extensions. Journal of Statistical Software, 63(20), 1-31. URL http://www.jstatsoft.org/v63/i20/. } diff --git a/man/logprrho.Rd b/man/logprrho.Rd index e1c41d5..ee97860 100644 --- a/man/logprrho.Rd +++ b/man/logprrho.Rd @@ -28,7 +28,7 @@ Numerical. %% ~put references to the literature/web site here ~ %%} \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~ diff --git a/man/mysplinefun.Rd b/man/mysplinefun.Rd index 61e402c..be86fa8 100644 --- a/man/mysplinefun.Rd +++ b/man/mysplinefun.Rd @@ -37,7 +37,7 @@ Returns a function with \code{x} and \code{deriv} arguments. See \code{\link{sp %% ~put references to the literature/web site here ~ %%} \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~ diff --git a/man/recompute.impacts.Rd b/man/recompute.impacts.Rd index e91fd20..cfb8c02 100644 --- a/man/recompute.impacts.Rd +++ b/man/recompute.impacts.Rd @@ -32,7 +32,7 @@ Original object with the updated summary statistics of the impacts. Bivand et al. (2013) } \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~ diff --git a/man/rescalemarg.Rd b/man/rescalemarg.Rd index 3394c86..730f7e4 100644 --- a/man/rescalemarg.Rd +++ b/man/rescalemarg.Rd @@ -31,7 +31,7 @@ probability densities. This is also an object of classes \code{inla.marginal}. INLA } \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~ diff --git a/man/sem.Rd b/man/sem.Rd index 828d079..de3fbe0 100644 --- a/man/sem.Rd +++ b/man/sem.Rd @@ -89,19 +89,19 @@ the variance-covariance matrix of the error term or random effects. An \code{inla} object. } \references{ - Roger S. Bivand, Virgilio Gómez-Rubio, Håvard Rue (2014). Approximate + Roger S. Bivand, Virgilio Gómez-Rubio, Hĺvard Rue (2014). Approximate Bayesian inference for spatial econometrics models. Spatial Statistics, Volume 9, 146-165. - Roger S. Bivand, Virgilio Gómez-Rubio, Håvard Rue (2015). Spatial + Roger S. Bivand, Virgilio Gómez-Rubio, Hĺvard Rue (2015). Spatial Data Analysis with R-INLA with Some Extensions. Journal of Statistical Software, 63(20), 1-31. URL http://www.jstatsoft.org/v63/i20/. - Virgilio Gómez-Rubio and Francisco-Palmí Perales (2016). Spatial Models with the Integrated Nested Laplace Approximation within Markov Chain Monte Carlo. Submitted. + Virgilio Gómez-Rubio and Francisco-Palmí Perales (2016). Spatial Models with the Integrated Nested Laplace Approximation within Markov Chain Monte Carlo. Submitted. } \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~ diff --git a/man/trIrhoWinv.Rd b/man/trIrhoWinv.Rd index e5281f2..24e5863 100644 --- a/man/trIrhoWinv.Rd +++ b/man/trIrhoWinv.Rd @@ -2,10 +2,10 @@ \alias{trIrhoWinv} \title{ -Compute trace of (I-rho*W)^{-1} matrix +Compute trace of (I-rho*W)^\{-1\} matrix } \description{ -This function computes (or estimates) the trace of matrix (I-rho*W)^{-1}, +This function computes (or estimates) the trace of matrix (I-rho*W)^\{-1\}, which is often needed when computing impacts in some spatial econometrics models. } @@ -21,7 +21,7 @@ Adjacency matrix. Usually, it is row-standardised. Value of spatial autocorrelation parameter \code{rho}. } \item{offset}{ -Number of times (I-rho*W)^{-1} is multiplied by W (for sdm model). +Number of times (I-rho*W)^\{-1\} is multiplied by W (for sdm model). } \item{order}{ Order of Taylor expansion used in the approximation of the trace. @@ -35,7 +35,7 @@ only used if direct=TRUE. } } \details{ -This function computes the trace of (I-rho*W)^{-1}, which is later used +This function computes the trace of (I-rho*W)^\{-1\}, which is later used to computed the impacts. This is an internal function. } \value{ @@ -46,7 +46,7 @@ LeSage and Page (2008) Bivand et al. (2013) } \author{ -Virgilio Gómez-Rubio +Virgilio Gómez-Rubio } %%\note{ %% ~~further notes~~