Closed alexgenin closed 8 years ago
I realize now this is a bit related to issue #5.
OK, so the indicators
object should have the following structure:
list(variance = list(value = xx, ...), # OR variance = xx
skewness = list(value = xx, ...),
psd = `psd object`,
...) # Component names are taken from the list of functions above.
(class: c('spatial_indicators', 'list'))
We want the summary function to produce an output that looks more or less like this :
Indicators computed on 6 replicates
Numerical indicators:
==============================
IC | mean±sd
variance | 3.4±.153
skewness | .056±1.4
moranI | 32±5
Non-numerical indicators:
==============================
psd:
<summary of PSD fit>
(... other non-numerical indicators)
The summary function should run as following:
value=
component, then consider them as numerical indicators and show a line in the table (e.g. variance, skewness, etc.)value=
component, then if the summary() function exists for their class, print the results of that summary function (e.g. psd)Added print.method in db5d93d8f3ffa3832925db57fa9ccb04bd1a1943
We feel that your proposed output structure looks excellent. We should add Mean and Spectral Density Ratio to the list of Numerical Indicators. As for non-numerical indicators, these would include PSD with summary of the fit and graphs for the correlation and spectral functions. As of now we don't want to include automated fitting procedures for the Spectral density and correlation functions because it will be highly context dependent.
If it would be helpful, I can provide a representative table that includes the structure of the PSD fitting summary, etc, a little later.
We should drop fractal geometry from this list of 'indicators' because the interpretation of it as an early-warning signal is unclear.
Again, I may be posting this in a wrong thread. I wanted to think from the perspective of a user of the package. A researcher may want to use this package for the following scenarios:
1(a) Analyze spatial early warnings for CA like models where data is discrete. In such cases, the user will have multiple replicates for each parameter value of the stressor. 1(b) Analyze spatial early warnings for reaction diffusion equation like models where data is continuous. In such cases, the user will have multiple replicates for each parameter value of the stressor. 2 (a) Real data with only one snapshot 2 (b) Real data along some stressor gradient (so each stressor will typically have one or very few replicates)
In addition, for each of the scenarios, the user may want to use only some category of spatial warnings. I wonder whether the workflow you guys are thinking of captures all of these scenarios. The flow chart in Kefi et al, 2014, Plos One provides some ideas on the flow of the analyses.
Hi all,
We spent some time yesterday to rethink the overall workflow we could provide for a user of the spatialwarnings package. We ended up with this beautiful flowchart :
Basically, that means structuring the workflow into "tasks" which are families of similar indicators
For each of those tasks, the user would go through a compute/test/plot workflow as those families share most testing and diagnostic tools (we can further split those families later if it makes more sense). The plots at the end would require the user to provide input data about the stressor gradient to associate each replicate with a proper stressor value.
Mind the possibility of quantitative data as input which is something that was definitely overlooked before.
This way we cover all the workflows mentioned above while providing some guidance out of all the possible indicators.
Does that make sense ?
[1] Not implemented yet
Having all the single-indicator functions, we need a user-friendly function now that computes all the indicators and reports about their values. I suggest following the usual pattern of creating a new object class "shift_indicator" and add usual methods.
A user workflow could look this way (a bit similar to a glm workflow basically) :
as.*
function family)indicators
function to create the result object containing all the appropriate indicator values (naming is to be discussed)summary
function on theindicators
object, see what indicators show an interesting valueWhat I have in mind for a summary function is something with an output like :
Thoughts ? Ideas for the plot function ?