atsa-es / tvvarss Goto Github PK
View Code? Open in Web Editor NEWTime varying vector autoregressive state space modeling of community interactions in a Bayesian framework
Time varying vector autoregressive state space modeling of community interactions in a Bayesian framework
Just got an email from github saying I was granted push access to this repo. Was that accidental? Maybe you meant to add someone else?
There is an error in the specification of the prior for vecBdev
. It is intended to be the process error for the RW on B, but the specification on line 31 limits it to the interval [0,1] instead of [-c,c] as on line 101. This won't affect models with time-invariant B, though.
Right now MASS
is called from within simTVVAR()
, so we should instead add that to the list of others required at load.
It would seem that we could safely delete the /simulated_data/
folder and simulated_data_example.R
because we're trying to use the same generating & estimation models?
I was talking to Buhle about the if() statements causing us a bit of comp time, and he and I came up with this soln. At the point the user specifies the food web topology, they can also optionally specify the range of interactions strengths to consider for each type. I imagine we would have could have some defaults (eg, top-down are [-1,0]), but that people could opt for the possibility of, for example, specifying density dependent effects of [-1,1] instead of [0,1] to allow for 2-pt oscillations.
To do so, we would change the R code to track not only the position of each of the "td", "bu", etc elements, but also the [lower,upper] priors for the interactions. Then, instead of the if() statements necessary to know whether we are multiplying by and/or adding a constant, we simply do the math for every param. For example, now we have something like
if(top-down)
b_t = -1 * [inv-logit(logit(b_{t-1}) + error_t)]
if(competitive)
b_t = 2 * [inv-logit(logit(b_{t-1}) + error_t)] - 1
Instead we would have for all b
b_t = (upper - lower) * [inv-logit(logit(b_{t-1}) + error_t)] - lower
where [upper,lower] are passed to Stan for all b.
It would be good to include the flexibility for adding covariate effects to the process model.
We have 2 copies of an example from Ives et al: one in the base (Apr 19) and one in the /ives/
folder (Apr 3). Can we delete one of them?
It would be nice to have an option for count-based obs model (e.g., negative binomial), and it would make sense to include it as an option in the R wrapper.
A totally minor detail, but can we add another "V" to the name for Time Varying Vector AutoRegressive State-Space (ie, TVVARSS) in order to match the abbreviation of Ives & Dakos?
tvvarss
requires the data to be passed as an array with dims (sites, years, species), but simTVVAR
outputs the states (fake data) as we normally think about them in MARSS models: a matrix with dims (species, years). I would be in favor of changing tvvarss
to match the way we typically envision the data: (species, years) or optionally (species, years, sites).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.