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 script can be used to run really large models easily in order to test limits in SuiteSparse, Matrix, TMB, and INLA | |
## it loads simulated data created over all africa and all years | |
############################################# | |
## setup the environment for singularity R ## | |
############################################# | |
## Set core_repo location and tmb_repo loc | |
core_repo <- sprintf('/share/code/geospatial/lbd_core/') | |
tmb_repo <- sprintf('/home/j/temp/azimmer/suitesparse_overloader') |
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
/* ========================================================================== */ | |
/* === Supernodal/cholmod_super_symbolic ==================================== */ | |
/* ========================================================================== */ | |
/* ----------------------------------------------------------------------------- | |
* CHOLMOD/Supernodal Module. Copyright (C) 2005-2006, Timothy A. Davis | |
* The CHOLMOD/Supernodal Module is licensed under Version 2.0 of the GNU | |
* General Public License. See gpl.txt for a text of the license. | |
* CHOLMOD is also available under other licenses; contact authors for details. | |
* http://www.suitesparse.com |
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
/* ========================================================================== */ | |
/* === Supernodal/cholmod_super_numeric ===================================== */ | |
/* ========================================================================== */ | |
/* ----------------------------------------------------------------------------- | |
* CHOLMOD/Supernodal Module. Copyright (C) 2005-2006, Timothy A. Davis | |
* The CHOLMOD/Supernodal Module is licensed under Version 2.0 of the GNU | |
* General Public License. See gpl.txt for a text of the license. | |
* CHOLMOD is also available under other licenses; contact authors for details. | |
* http://www.suitesparse.com |
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
#=============================================================================== | |
# SuiteSparse_config.mk: common configuration file for the SuiteSparse | |
#=============================================================================== | |
# This file contains all configuration settings for all packages authored or | |
# co-authored by Tim Davis: | |
# | |
# Package Version Description | |
# ------- ------- ----------- | |
# AMD 1.2 or later approximate minimum degree ordering |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
## Makefile for downloading the source code and building | |
## a binary package of R-INLA | |
## | |
## Run 'make' with no arguments for usage instructions | |
## | |
## This Makefile has been tested under Ubuntu 17.10 | |
## | |
## Requirements: | |
## mercurial | |
## A full gcc/g++/gfortran installation |
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
#include <TMB.hpp> | |
#include <Eigen/Sparse> | |
#include <vector> | |
using namespace density; | |
using Eigen::SparseMatrix; | |
// helper function to make sparse SPDE precision matrix | |
// Inputs: | |
// logkappa: log(kappa) parameter value | |
// logtau: log(tau) parameter value |
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
//////////////////////////////////////////////////////////////// | |
// Author: Nafis Sadat | |
// Purpose: Forecasting model base across countries, incorporating ARIMA components | |
// Created: Sometime in 2017 | |
//////////////////////////////////////////////////////////////// | |
#include <TMB.hpp> | |
#include <Eigen/Sparse> | |
#include <vector> |
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
require(ncdf4) | |
require(ncdf4.helpers) | |
require(data.table) | |
## Get the name of the value vars in the nc file | |
get_nc_value_name <- function(nc_file) { | |
## Get names | |
nc_obj <- nc_open(nc_file) | |
name<-names(nc_obj$var) |
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
## Makefile for downloading the source code and building | |
## a binary package of R-INLA on Debian/Buster | |
## using a custom version of R and Intel MKL | |
## Intended for use by : Institute for Health Metrics and Evaulation | |
## | |
## Maintained by : Nafis Sadat, [email protected] | |
## | |
## Run 'make' with no arguments for usage instructions | |
## | |
## This Makefile has been tested under Debian GNU/Linux |