-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23795e2
commit a28d827
Showing
37 changed files
with
2,884 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
414ac92c4d39dfe29198ad2334503781 *DESCRIPTION | ||
616360d02ede2594e93f3106dafe8ade *NAMESPACE | ||
22e349f0bd517dda5e0ef6b4b97778a4 *NEWS.md | ||
7efcb6bf4bf941a3d1aedf46febbce78 *DESCRIPTION | ||
8795f9d3a3f1b84306311a834c03cb77 *NAMESPACE | ||
0c7eaed6acf539c3e5b9df7c1cbdb71f *NEWS.md | ||
591501246e19faa6fa46d5db1192581e *R/family.R | ||
2d8fb55fd1f2692f66040d5f1ffe54bd *R/fitting.R | ||
67f28947877adabcbe4ff5b5aac74471 *R/fitting.R | ||
8f87959bc9c0025114d13f40dfe9775f *R/format_data.R | ||
14808a5ce06013d76df7b23800b55f14 *R/glmmfields-package.R | ||
2dc03779de722dbb3310a958e45954fe *R/methods.R | ||
739b7006f78e5bfde7bb3ab137452a28 *R/plot.R | ||
18958a60f2459df0cb85078849964848 *R/predict.R | ||
7619bd7a570d76264705782d93b5df95 *R/predict.R | ||
6d8331b4cc7b91617cc84979adde823f *R/priors.R | ||
1aaa246c53120c557468a57d12f99a9d *R/sim.R | ||
db68c0796882372fe8a4a15f76a00567 *R/stan_pars.R | ||
1c8249eb55b244cf8fa0b573b65d1570 *R/stanmodels.R | ||
aefbc5c00caad6ec520914cfe1c22bf3 *R/zzz.R | ||
2f8bb1d2710cde6ce807fc55550b2116 *build/vignette.rds | ||
88f64e7df66edcf1e4bd7b0abc3412ab *inst/CITATION | ||
afe22da3c34faa9b829c4b8343ac88c5 *inst/doc/spatial-glms.R | ||
f01f9b33ec98a387b544845a28fce364 *inst/doc/spatial-glms.Rmd | ||
2a9a8b64416e0383297de594d22c88fc *inst/doc/spatial-glms.html | ||
855c064dbf8deaff96c8dc8a87169109 *inst/include/meta_header.hpp | ||
8e67b680b71478dbbce457b38476233d *R/stan_pars.R | ||
61a18858d3a3157cf40c7748b37bd828 *R/stanmodels.R | ||
27ddd17174166eae01f777cbe0add0b4 *build/vignette.rds | ||
1cc60bdd8610449d30184e0bb374bf46 *configure | ||
6bea7bdbd44ffa386677bfdec2d1984b *configure.win | ||
c896d2e11c9aa7c025c3920b3e3eab66 *inst/CITATION | ||
fef4c8abd269511372a9c0c2d624cff9 *inst/doc/spatial-glms.R | ||
80c39d81a9aad4f507bae2d075e8d70c *inst/doc/spatial-glms.Rmd | ||
bcf181f9a48a561e95f473215eb84537 *inst/doc/spatial-glms.html | ||
855c064dbf8deaff96c8dc8a87169109 *inst/include/stan_meta_header.hpp | ||
45cf4ce76e5498ffba0c24610f950a8f *inst/stan/glmmfields.stan | ||
f7045c08b543061ac102cc09b86e4410 *inst/stan/include/license.stan | ||
9e888023dd26dc4cb904d14bb220b66e *inst/test.R | ||
5552da1f2ebaa0aa6058b938cdf3a9b4 *man/format_data.Rd | ||
15120b78c6117c9c85e4b58822d40a6a *man/glmmfields-package.Rd | ||
b7875aac043cdd89b09ae71dca1b42fb *man/glmmfields.Rd | ||
683c5d8c9c52976eb0fc5221b422b83a *man/glmmfields.Rd | ||
a954f93cc60a089aa929d518e48561fc *man/lognormal.Rd | ||
c68ec5a804539c4cc2a08986cbd6ef26 *man/loo.Rd | ||
fbcbd8c199641a9ac649d74b87782065 *man/nbinom2.Rd | ||
0dc17c4537fcae4bc470927a533918d6 *man/plot.glmmfields.Rd | ||
ce9e0a1ac1151a9d09838e8dc5db68f4 *man/predict.Rd | ||
d628a28cee511d9f91a1c812ecc125a0 *man/predict.Rd | ||
fd3ea29fba1004c2c821f73131a3a369 *man/priors.Rd | ||
267fed93d852a526793e599be97302be *man/sim_glmmfields.Rd | ||
8b990eb0ba0476def8eadcc3b8d7f284 *man/stan_pars.Rd | ||
d7466e066fa9fd20977c3dfa70b8bb39 *man/tidy.Rd | ||
e385b69646bcc4555858feb68eb1f52e *src/Makevars | ||
2d00973d800c4813504154a0267fe2f8 *src/Makevars.win | ||
d41d8cd98f00b204e9800998ecf8427e *src/Modules.cpp | ||
bca3e8755f348f81552bb65fc6001da6 *src/init.cpp | ||
d41d8cd98f00b204e9800998ecf8427e *src/stan_files/chunks/common_functions.stan | ||
1343c4c6fedaed31056cbc7c04c44ab7 *src/stan_files/chunks/license.stan | ||
63ea07fd8aa34d48b4cf4200dd01d67f *src/stan_files/glmmfields.stan | ||
8eb94ab0ca38362bef9a1ae171d63fad *src/Makevars | ||
457929755cc1db9abe969d16b0006005 *src/Makevars.win | ||
a7eb8f56f4dd47984f7e5fbe5fdbefc6 *src/RcppExports.cpp | ||
426f38a399735d960553185277d67eab *src/stanExports_glmmfields.cc | ||
752d22017d797bec2d5a8e21e0cabd8d *src/stanExports_glmmfields.h | ||
962816c110c4a3d50cb8c9729b10f47c *tests/testthat.R | ||
c9fe58f78c0e1fb163fa157438c24461 *tests/testthat/test-families.R | ||
96f72035beb3865d574119ce5f26dea6 *tests/testthat/test-fit-ar-processes.R | ||
15e0d4e2be8f2cefac1f34cd0beee55e *tests/testthat/test-fit-basic.R | ||
74b578b718b399130f4607057f10a2e4 *tests/testthat/test-fit-observation-models.R | ||
0f41c6004b6f486a8b2c69200ae883f2 *tests/testthat/test-fit-with-predictors.R | ||
01f37d955a32c5cbc8c1c310260abac7 *tests/testthat/test-fit-ar-processes.R | ||
526ad88ece9fb60f761516ce5eea0fb7 *tests/testthat/test-fit-basic.R | ||
c932386d8a86323560fbf97b4d09a5d2 *tests/testthat/test-fit-observation-models.R | ||
674eab315a135d0751941b53c86106de *tests/testthat/test-fit-with-predictors.R | ||
13a1b7fef17c2d9489425f98807cf33d *tests/testthat/test-format-data.R | ||
a756eae3f79a7b4cf6b4936c21526943 *tests/testthat/test-predict.R | ||
cd352df2d4e1216390b8219524833f26 *tests/testthat/test-predict.R | ||
d2a1a8fe460992c766dbd3ba0abfbeaa *tests/testthat/test-priors.R | ||
c9afa41370ddc60acc527cb96782da2d *tests/testthat/test-stations.R | ||
34e6b12ba370464b64c80d303f379d7d *tools/make_cc.R | ||
f01f9b33ec98a387b544845a28fce364 *vignettes/spatial-glms.Rmd | ||
9605f4d3cf3f1b82de83b7aeb7839aa3 *tests/testthat/test-stations.R | ||
80c39d81a9aad4f507bae2d075e8d70c *vignettes/spatial-glms.Rmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,25 @@ | ||
# Part of the bayesdfa package for estimating model parameters | ||
# Copyright (C) 2015, 2016, 2017 Trustees of Columbia University | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 3 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
# Generated by rstantools. Do not edit by hand. | ||
|
||
# This file is only intended to be used during the installation process | ||
# nocov start | ||
MODELS_HOME <- "src" | ||
if (!file.exists(MODELS_HOME)) MODELS_HOME <- sub("R$", "src", getwd()) | ||
# names of stan models | ||
stanmodels <- c("glmmfields") | ||
|
||
stan_files <- dir(file.path(MODELS_HOME, "stan_files"), | ||
pattern = "stan$", full.names = TRUE) | ||
stanmodels <- lapply(stan_files, function(f) { | ||
model_cppname <- sub("\\.stan$", "", basename(f)) | ||
stanfit <- rstan::stanc(f, allow_undefined = TRUE, | ||
obfuscate_model_name = FALSE) | ||
stanfit$model_cpp <- list(model_cppname = stanfit$model_name, | ||
# load each stan module | ||
Rcpp::loadModule("stan_fit4glmmfields_mod", what = TRUE) | ||
|
||
# instantiate each stanmodel object | ||
stanmodels <- sapply(stanmodels, function(model_name) { | ||
# create C++ code for stan model | ||
stan_file <- if(dir.exists("stan")) "stan" else file.path("inst", "stan") | ||
stan_file <- file.path(stan_file, paste0(model_name, ".stan")) | ||
stanfit <- rstan::stanc_builder(stan_file, | ||
allow_undefined = TRUE, | ||
obfuscate_model_name = FALSE) | ||
stanfit$model_cpp <- list(model_cppname = stanfit$model_name, | ||
model_cppcode = stanfit$cppcode) | ||
return(do.call(methods::new, args = c(stanfit[-(1:3)], Class = "stanmodel", | ||
mk_cppmodule = function(x) get(paste0("model_", model_cppname))))) | ||
} | ||
) | ||
names(stanmodels) <- sub("\\.stan$", "", basename(stan_files)) | ||
rm(MODELS_HOME) | ||
# nocov end | ||
# create stanmodel object | ||
methods::new(Class = "stanmodel", | ||
model_name = stanfit$model_name, | ||
model_code = stanfit$model_code, | ||
model_cpp = stanfit$model_cpp, | ||
mk_cppmodule = function(x) get(paste0("rstantools_model_", model_name))) | ||
}) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by rstantools. Do not edit by hand. | ||
|
||
#! /bin/sh | ||
"${R_HOME}/bin/Rscript" -e "rstantools::rstan_config()" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by rstantools. Do not edit by hand. | ||
|
||
#! /bin/sh | ||
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "rstantools::rstan_config()" |
Oops, something went wrong.