Skip to content

Commit

Permalink
Adding feature fine_scale=TRUE
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Thorson authored May 10, 2019
2 parents 5affccb + c4dcb13 commit 66f0121
Show file tree
Hide file tree
Showing 45 changed files with 2,422 additions and 1,543 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: VAST
Type: Package
Title: Vector-autoregressive spatio-temporal (VAST) model
Version: 2.1.0
Date: 2019-03-01
Version: 3.0.0
Date: 2019-05-09
Authors@R: person("James","Thorson", email="James.Thorson@noaa.gov", role=c("aut","cre"))
Maintainer: James Thorson <James.Thorson@noaa.gov>
Description: VAST is an R package for conducting spatio-temporal analysis
Expand Down Expand Up @@ -35,11 +35,11 @@ Imports:
TMBhelper
Depends:
R (>= 3.1.0),
FishStatsUtils
Suggests:
testthat,
knitr,
rmarkdown,
FishStatsUtils,
R.rsp
Remotes:
james-thorson/FishStatsUtils,
Expand Down
10 changes: 2 additions & 8 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
# Generated by roxygen2: do not edit by hand

export(Build_TMB_Fn)
export(Coherence)
export(Crossvalidate_Fn)
export(Data_Fn)
export(Make_Map)
export(Param_Fn)
export(Plot_Overdispersion)
export(Plot_factors)
export(Rerun_Fn)
export(Summarize)
export(Summarize_Covariance)
export(calc_coherence)
export(calc_cov)
export(calc_synchrony)
export(calculate_proportion)
export(make_data)
export(make_map)
export(make_model)
export(plot_eigen)
export(make_parameters)
importFrom(grDevices,colorRampPalette)
importFrom(grDevices,dev.off)
importFrom(grDevices,png)
Expand Down
92 changes: 0 additions & 92 deletions R/Coherence.R

This file was deleted.

76 changes: 0 additions & 76 deletions R/Crossvalidate_Fn.R

This file was deleted.

14 changes: 10 additions & 4 deletions R/Make_Map.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @export
Make_Map <-
make_map <-
function( DataList, TmbParams, RhoConfig=c("Beta1"=0,"Beta2"=0,"Epsilon1"=0,"Epsilon2"=0), Npool=0 ){

# Local functions
Expand Down Expand Up @@ -262,9 +262,15 @@ function( DataList, TmbParams, RhoConfig=c("Beta1"=0,"Beta2"=0,"Epsilon1"=0,"Eps
Map[["lambda2_k"]] = factor(Map[["lambda2_k"]])

# Dynamic covariates
if( "X_xtp" %in% names(DataList) ){
Var_p = apply( DataList[["X_xtp"]], MARGIN=3, FUN=function(array){var(as.vector(array))})
Var_tp = apply( DataList[["X_xtp"]], MARGIN=2:3, FUN=var )
if( any(c("X_xtp","X_itp") %in% names(DataList)) ){
if( "X_xtp" %in% names(DataList) ){
Var_p = apply( DataList[["X_xtp"]], MARGIN=3, FUN=function(array){var(as.vector(array))})
Var_tp = apply( DataList[["X_xtp"]], MARGIN=2:3, FUN=var )
}
if( "X_itp" %in% names(DataList) ){
Var_p = apply( DataList[["X_itp"]], MARGIN=3, FUN=function(array){var(as.vector(array))})
Var_tp = apply( DataList[["X_itp"]], MARGIN=2:3, FUN=var )
}
if( "gamma1_tp" %in% names(TmbParams) ){
Map[["gamma1_tp"]] = Map[["gamma2_tp"]] = matrix( 1:(DataList$n_t*DataList$n_p), nrow=DataList$n_t, ncol=DataList$n_p )
# By default:
Expand Down
63 changes: 0 additions & 63 deletions R/Plot_Overdispersion.R

This file was deleted.

Loading

0 comments on commit 66f0121

Please sign in to comment.