Title: | A Collection of Tools to Conduct Levins' Loop Analysis |
---|---|
Description: | Performs Levins' loop analysis of qualitatively-specified complex causal systems. Loop analysis makes qualitative predictions of variable change in a system of causally interdependent variables, where "qualitative" means direct causal relationships and indirect causal effects are coded as sign only (i.e. increases, decreases, no change, and ambiguous). This implementation includes output support for graphs in .dot file format for use with visualization software such as 'graphviz' (<https://graphviz.org>). 'LoopAnalyst' provides tools for the construction and output of community matrices, computation and output of community effect matrices, tables of correlations, adjoint, absolute feedback, weighted feedback and weighted prediction matrices, change in life expectancy matrices, and feedback, path and loop enumeration tools. |
Authors: | Alexis Dinno <[email protected]> |
Maintainer: | Alexis Dinno <[email protected]> |
License: | GPL-2 |
Version: | 1.2-7 |
Built: | 2024-11-05 03:56:13 UTC |
Source: | https://github.com/cran/LoopAnalyst |
Performs Levin's loop analysis of qualitatively-specified complex causal systems.
Loop analysis makes qualitative predictions of variable change in a system of causally interdependent variables, where "qualitative" means direct causal relationships and indirect causal effects are coded as sign only (i.e. increases, decreases, non change, and ambiguous). This implementation includes output support for graphs in .dot
file format for use with visualization software such as graphviz
(<https://graphviz.org>). LoopAnalyst
provides tools for the construction and output of community matrices (make.cm
), computation and output of community effect matrices (make.cem
), tables of correlations (cem.corr
), adjoint (make.adjoint
), absolute feedback (feedback
), weighted feedback and weighted prediction matrices (weighted.predictions
), change in life expectancy matrices (make.clem
), and feedback, path and loop enumeration (enumerate.paths
and enumerate.loops
) tools.
Alexis Dinno [email protected]
Dambacher, J. M. and Li, H. W. and Rossignol, P. A. (2002) Relevance of community structure in assessing indeterminacy of ecological predictions. Ecology, 83(5),1372–1385. <doi:10.2307/3071950>.
Dambacher, J. M., et al. (2003) Qualitative stability and ambiguity in model ecosystems. The American Naturalist, 161(6),876–888. <doi:10.1086/367590>.
Dambacher, J. M., R. Levins and P. A. Rossignol. (2005) Life expectancy change in perturbed communities: Derivation and qualitative analysis. Mathematical Biosciences 197,1–14. <doi:10.1016/j.mbs.2005.06.001>.
Levins, R. (1974) Discussion Paper: The qualitative analysis of partially specified systems. Annals of the New York Academy of Sciences, 231(1),123–138. <doi:10.1111/j.1749-6632.1974.tb20562.x>.
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
Validates a community effect matrix and computes its associated tables of correlations.
cem.corr(CEM)
cem.corr(CEM)
CEM |
A valid community effect matrix. |
The supplied matrix is validated as a community effect matrix, and the table of predicted correlations is computed. Output is formatted as per Puccia and Levins, 1986 (see page 57) and correlations are represented as "-", "0", "+", and "?" for negative correlation, no correlation, positive correlation,and ambiguous correlation, respectively.
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. pp 55-59. <doi:10.4159/harvard.9780674435070>.
## compute tables of correlations data(cm.levins) cem <- make.cem(cm.levins) cem.corr(cem)
## compute tables of correlations data(cm.levins) cem <- make.cem(cm.levins) cem.corr(cem)
This dataset contains the computed community effect matrix of the model in Figure 2 from Levins' 1996 paper (see references).
data(cem.levins)
data(cem.levins)
A 4 by 4 (-1, 0, 1) matrix. The matrix is interpreted as the ith parameter has the indirect causal effect [i,j] on parameter j after the system stabilizes in response to a perturbation.
Levins, R. and Schultz, B. B. (1996) Effects of density dependence, feedback and environmental sensitivity on correlations among predators, prey and plant resources: Models and practical implications. Journal of Animal Ecology, 65(6),802-812. <doi:10.2307/5678>.
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
This dataset represents the causal relationships amongst the ten variables defined by Dambacher's 2002 article in figure 6, page 1381.
data(cm.dambacher)
data(cm.dambacher)
A 10 by 10 (-1, 0, 1) matrix with each element having at least one parent and at least one child. The matrix is interpreted as the jth variable has the direct causal effect a[i,j] on variable i.
Dambacher, J. M. and Li, H. W. and Rossignol, P. A. (2002) Relevance of community structure in assessing indeterminacy of ecological predictions. Ecology, 83(5),1372–1385. <doi:10.2307/3071950>.
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
This dataset represents the causal relationships amongst the four variables defined by Dambacher et al. in their 2005 publication in figure 2, page 10.
data(cm.DLR)
data(cm.DLR)
A 4 by 4 (-1, 0, 1) matrix with each element having at least one parent and at least one child. The matrix is interpreted as the jth variable has the direct causal effect a[i,j] on variable i.
Dambacher, J. M., R. Levins and P. A. Rossignol. (2005) Life expectancy change in perturbed communities: Derivation and qualitative analysis. Mathematical Biosciences 197,1–14. <doi:10.1016/j.mbs.2005.06.001>.
This dataset represents the causal relationships amongst the four variables defined by Levins' 1996 publication in figure 2, page 804.
data(cm.levins)
data(cm.levins)
A 4 by 4 (-1, 0, 1) matrix with each element having at least one parent and at least one child. The matrix is interpreted as the jth variable has the direct causal effect a[i,j] on variable i.
Levins, R. and Schultz, B. B. (1996) Effects of density dependence, feedback and environmental sensitivity on correlations among predators, prey and plant resources: Models and practical implications. Journal of Animal Ecology, 65(6),802-812. <doi:10.2307/5678>.
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
Enumerates a list of all loops in a (-1, 0, 1) matrix.
enumerate.loops(CM)
enumerate.loops(CM)
CM |
A (-1, 0 1) matrix. |
The returned list of loops contains each loop in CM
in breadth-first search order). Each element in a loop is represented by its variable number, and the first element also terminates each loop.
A list of loops.
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## assess community matrix data(submatrix) enumerate.loops(submatrix)
## assess community matrix data(submatrix) enumerate.loops(submatrix)
Enumerates a list of all paths from variable i to variable j in a community matrix after first validating that CM
is a community matrix.
enumerate.paths(CM,i,j)
enumerate.paths(CM,i,j)
CM |
A community matrix. |
i , j
|
variables in the community matrix |
The returned list of paths contains each path from i to j in CM
in breadth-first search order). Each element in a path is represented by its variable number.
A list of paths.
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## assess community matrix data(cm.levins) enumerate.paths(cm.levins,2,4)
## assess community matrix data(cm.levins) enumerate.paths(cm.levins,2,4)
Computes the qualitative feedback of a partially specified system; where qualitative means direction: increases, decreases, no change, or ambiguous.
feedback(C)
feedback(C)
C |
A (-1, 0 1) square matrix. |
The supplied matrix is validated as a square (-1, 0, 1) matrix, and the sign-corrected product of system-spanning sets of disjunct loops is summed over all levels of feedback, and the result returned. Ambiguous results are returned as NA
.
-1, 0, 1, or NA
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## compute the feedback of a system data(submatrix) feedback(submatrix)
## compute the feedback of a system data(submatrix) feedback(submatrix)
Represents a community effect matrix as a graph in the dot language. This representation is sometimes termed a 'prediction scenario'.
graph.cem(CEM, file, color="bw")
graph.cem(CEM, file, color="bw")
CEM |
a community effect matrix to be graphed. |
file |
a connection or a character string giving the name of the dot file (should have a .dot suffix). |
color |
select which color mode to graph the system: |
This function outputs a dot file for use with graphviz
or similar graph layout package to visually represent the community effect matrix system. The color options color
and greyscale
assist in graph readability when there are a large number of nodes and connections between them. Ambiguous effects are represented by dotted edges and tee-style arrowheads.
The representation of loop analytic predictions in graph form is an emerging practice. Feedback and ideas are welcome, and I am amenable to implementing them in future versions of LoopAnalyst. graph.cem
does not currently work with weighted.predictions
output.
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Gansner, E., Koutsofios, E. and North, S. (2002) Drawing graphs with dot. https://www.graphviz.org
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## graph the community effect matrix of cm.levins data(cm.levins) cem.levins <- make.cem(cm.levins) graph.cem(cem.levins, file="levins.dot", color="color") ## graph the community effect matrix of cm.dambacher data(cm.dambacher) cem.dambacher <- make.cem(cm.dambacher) graph.cem(cem.dambacher, file="dambacher.dot", color="color")
## graph the community effect matrix of cm.levins data(cm.levins) cem.levins <- make.cem(cm.levins) graph.cem(cem.levins, file="levins.dot", color="color") ## graph the community effect matrix of cm.dambacher data(cm.dambacher) cem.dambacher <- make.cem(cm.dambacher) graph.cem(cem.dambacher, file="dambacher.dot", color="color")
Represents a community matrix as a signed digraph in the dot language.
graph.cm(CM, file, color="bw")
graph.cm(CM, file, color="bw")
CM |
a community matrix to be graphed. |
file |
a connection or a character string giving the name of the dot file (should have a .dot suffix). |
color |
select which color mode to graph the system: |
This function outputs a dot file for use with graphviz
or similar graph layout package to visually represent the community matrix system. The color options color
and greyscale
assist in graph readability when there are a large number of nodes and connections between them.
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Gansner, E., Koutsofios, E. and North, S. (2002) Drawing graphs with dot. https://www.graphviz.org
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## graph a community matrix data(cm.levins) graph.cm(cm.levins, file="levins.dot") ## graph a community matrix data(cm.dambacher) graph.cm(cm.dambacher, file="dambacher.dot", color="color")
## graph a community matrix data(cm.levins) graph.cm(cm.levins, file="levins.dot") ## graph a community matrix data(cm.dambacher) graph.cm(cm.dambacher, file="dambacher.dot", color="color")
Validates a community matrix and computes the adjoint matrix of it's negative.
make.adjoint(CM, status=FALSE)
make.adjoint(CM, status=FALSE)
CM |
A valid community matrix. |
status |
Switches on an element-by-element progress indicator when set to |
The supplied matrix is validated as a community matrix, and the adjoint matrix of the community matrix's negative is computed. The value of a given element indicates the sum of feedback at all levels, under the assumption that, in the absence of relative specification of community matrix linkages, each level of feedback ought to account for the same proportion of total feedback contributing to the effect on j
of a press perturbation on i
. Values of a given element may be positive, zero or negative integer values, but of a magnitude no larger than the corresponding value in the absolute feedback matrix T.
NOTE: weighted feedback, adjoint and absolute feeback matrices are transposed relative to the community effect matrix.
The adjoint matrix of a negative community matrix
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Dambacher, J. M. and Li, H. W. and Rossignol, P. A. (2002) Relevance of community structure in assessing indeterminacy of ecological predictions. Ecology, 83(5),1372–1385. <doi:10.2307/3071950>.
Dambacher, J. M., et al. (2003) Qualitative stability and ambiguity in model ecosystems. The American Naturalist, 161(6),876–888. <doi:10.1086/367590>.
make.cem, make.wfm, make.T, and weighted.predictions
.
## compute adjoint of a negative of a community matrix data(cm.dambacher) make.adjoint(cm.dambacher)
## compute adjoint of a negative of a community matrix data(cm.dambacher) make.adjoint(cm.dambacher)
Validates and community matrix and computes its associated community effect matrix.
make.cem(CM, status=FALSE, out=FALSE)
make.cem(CM, status=FALSE, out=FALSE)
CM |
A valid community matrix. |
status |
Switches on an element-by-element progress indicator when set to |
out |
Switches on formatting of community effect matrix element output from "-1", "0", "1", " |
The supplied matrix is validated as a community matrix, and the community effect matrix (i.e. table of predictions) is computed. Ambiguous effects are represented by link{NA}
.
A community effect matrix
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## compute community effect matrix data(cm.levins) make.cem(cm.levins)
## compute community effect matrix data(cm.levins) make.cem(cm.levins)
Validates a community matrix and computes its associated change in life expectancy matrix.
make.clem(CM, status=FALSE)
make.clem(CM, status=FALSE)
CM |
A valid community matrix. |
status |
Switches on an element-by-element progress indicator when set to |
The supplied matrix is validated as a community matrix, and a table of predicted changes in life expectancy (i.e. the inverse of turnover) given a press perturbation is computed. Diagonal elements can differ for births and deaths, and these predictions, in that order, are separated by a comma.
A change in life expectancy matrix
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Dambacher, J. M., R. Levins and P. A. Rossignol. (2005) Life expectancy change in perturbed communities: Derivation and qualitative analysis. Mathematical Biosciences 197,1–14. <doi:10.1016/j.mbs.2005.06.001>.
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## compute change in life expectancy matrix data(cm.DLR) make.clem(cm.DLR)
## compute change in life expectancy matrix data(cm.DLR) make.clem(cm.DLR)
Make and validate a new community matrix by soliciting the number of varibles, variable names and interactions between each.
make.cm(n)
make.cm(n)
n |
an integer value denoting the number of component variables modeled by the community matrix. The minimum number of variables is 2. If left unspecified, make.cm will prompt for the number of variables. |
make.cm prompts the user for the number of variables (if not specified as an option), variable names, and the qualitative signifier (-1, 0, or 1) of direct causal effect from and to each variable.
a labeled (-1,0,1) square matrix.
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## assign a community matrix ## Not run: CM <- make.cm(4)
## assign a community matrix ## Not run: CM <- make.cm(4)
Validates a community matrix and computes its absolute feedback matrix.
make.T(CM, status=FALSE)
make.T(CM, status=FALSE)
CM |
A valid community matrix. |
status |
Switches on an element-by-element progress indicator when set to |
The supplied matrix is validated as a community matrix, and its absolute feedback matrix is computed. The value of a given element indicates the total number of disjoint cycles spanning all varibles of the complementary subsystem for each path from j to i. Values of a given element may be positive or zero, and bounds the magnitude of the associated adjoint matrix of the negative community matrix.
NOTE: weighted feedback, adjoint and absolute feeback matrices are transposed relative to the community effect matrix.
The absolute feedback matrix for a community matrix
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Dambacher, J. M. and Li, H. W. and Rossignol, P. A. (2002) Relevance of community structure in assessing indeterminacy of ecological predictions. Ecology, 83(5),1372–1385. <doi:10.2307/3071950>.
Dambacher, J. M., et al. (2003) Qualitative stability and ambiguity in model ecosystems. The American Naturalist, 161(6),876–888. <doi:10.1086/367590>.
make.cem, make.wfm, make.adjoint and weighted.predictions
.
## compute T for a community matrix data(cm.dambacher) make.T(cm.dambacher)
## compute T for a community matrix data(cm.dambacher) make.T(cm.dambacher)
Validates a community matrix and computes its associated weighted feedback matrix.
make.wfm(CM, status=FALSE, digits=1, sign=FALSE)
make.wfm(CM, status=FALSE, digits=1, sign=FALSE)
CM |
A valid community matrix. |
status |
Switches on an element-by-element progress indicator when set to |
digits |
Indicates precision for elements in the weighted feedback matrix. By default, this is set to 1 significant digit. |
sign |
Switch to provide output as the signed value of the adjoint matrix elements divided by the absolute feedback matrix elements. The default value is |
The supplied matrix is validated as a community matrix, and the weighted feedback matrix is computed. Each element is equal to the absolute value of the corresponding element of the adjoint of the negative community matrix divided by the corresponding element of the total feedback matrix T. Resulting values range from 0 to 1.0, with values of magnitude of 0.5 or greater indicating that positive or negative feedback is expected to dominate (as per the sign of the adjoint value). Values of 1 indicate unambiguous effects of feedback, regardless of the quantitative magnitude of the system's linkages. Unresolvably ambiguous effects are represented by values between 0 and 0.5. The sign
implementation differs from Dambacher's.
NOTE: weighted feedback, adjoint and absolute feeback matrices are transposed relative to the community effect matrix.
The weighted feedback matrix for a community matrix
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Dambacher, J. M. and Li, H. W. and Rossignol, P. A. (2002) Relevance of community structure in assessing indeterminacy of ecological predictions. Ecology, 83(5),1372–1385. <doi:10.2307/3071950>.
Dambacher, J. M., et al. (2003) Qualitative stability and ambiguity in model ecosystems. The American Naturalist, 161(6),876–888. <doi:10.1086/367590>.
make.cem, make.adjoint, make.T, weighted.predictions
.
## compute weighted feedback matrix data(cm.dambacher) make.wfm(cm.dambacher)
## compute weighted feedback matrix data(cm.dambacher) make.wfm(cm.dambacher)
Output a community matrix or community effect matrix object in convetional format to the console.
out.cm(M)
out.cm(M)
M |
A matrix to be output. |
This function outputs a community matrix or community effect matrix object in convetional format to the console where matrix elements are formatted from "-1", "0", "1", and "NA
" to "-", "0", "+", and "?" respectively. This command does not validate the input matrix.
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## out a community matrix data(cem.levins) out.cm(cem.levins)
## out a community matrix data(cem.levins) out.cm(cem.levins)
Validates and saves a community matrix in compressed binary format.
save.cm(CM, file)
save.cm(CM, file)
CM |
A community matrix to be validated and saved. |
file |
a connection or a character string giving the name of the file to save. |
This function uses validate.cm
and save
to store a communty matrix object.
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
load
.
## save a community matrix data(cm.levins) save.cm(cm.levins, file="Model_1.cm")
## save a community matrix data(cm.levins) save.cm(cm.levins, file="Model_1.cm")
This dataset represents a subset of the causal relationships defining Dambacher's five-variable system. Specifically, it contains the first five variables of the dataset cm.dambacher
.
data(submatrix)
data(submatrix)
A 5 by 5 (-1, 0, 1) matrix. The matrix is interpreted as the jth variable has the direct causal effect a[i,j] on i.
Dambacher, J. M. and Li, H. W. and Rossignol, P. A. (2002) Relevance of community structure in assessing indeterminacy of ecological predictions. Ecology, 83(5),1372–1385. <doi:10.2307/3071950>.
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
Validates a community effect matrix, returning descriptive errors if validation fails and no value otherwise.
validate.cem(CEM)
validate.cem(CEM)
CEM |
A potential community effect matrix to be tested. |
A community effect matrix is deemed valid if it is a square matrix, with no missing values, where each element has the value NA, -1, 0 or 1.
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## assess community effect matrix data(cm.levins) make.cem(cm.levins) -> cem.levins validate.cem(cem.levins)
## assess community effect matrix data(cm.levins) make.cem(cm.levins) -> cem.levins validate.cem(cem.levins)
Validates a community matrix, returning descriptive errors if validation fails and nothing otherwise.
validate.cm(CM)
validate.cm(CM)
CM |
A potential community matrix to be tested. |
A community matrix is deemed valid if it is a square matrix, with no missing values, where each element has the value -1, 0 or 1, it is not a fully specified matrix, and there is at least one direct or indirect path from each element to each element.
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Puccia, C. J. and Levins, R. (1986) Qualitative Modeling of Complex Systems: An Introduction to Loop Analysis and Time Averaging. Cambridge: Harvard University Press. <doi:10.4159/harvard.9780674435070>.
## assess community matrix data(cm.levins) validate.cm(cm.levins)
## assess community matrix data(cm.levins) validate.cm(cm.levins)
Validates a community matrix and computes its associated weighted predictions matrix.
weighted.predictions(CM, status=FALSE)
weighted.predictions(CM, status=FALSE)
CM |
A valid community matrix. |
status |
Switches on an element-by-element progress indicator when set to |
The supplied matrix is validated as a community matrix, and a weighted predictions matrix is computed. This matrix is equivalent to the transposed community effect matrix with some ambiguous elements resolved using the value of the corresponding feedback matrix. Such values are represented enclosed in parentheses. In keeping with the paper by Levins, Dambacher and Rossignol (expression 42 in the paper cited below), the matrix orientation is congruent with the weighted feedback matrix, and transposed to the community effect matrix.
The weighted prediction matrix for a community matrix
Alexis Dinno ([email protected])
Please contact me with any questions, bug reports or suggestions for improvement. Fixing bugs will be facilitated by sending along:
[1] | a copy of your relevant R data file (de-labeled or anonymized is fine), |
[2] | a copy of the command syntax used, and |
[3] | a copy of the exact output of the command. |
https://alexisdinno.com/LoopAnalyst/
Dambacher, J. M. and Li, H. W. and Rossignol, P. A. (2002) Relevance of community structure in assessing indeterminacy of ecological predictions. Ecology, 83(5),1372–1385. <doi:10.2307/3071950>.
Dambacher, J. M., et al. (2003) Qualitative stability and ambiguity in model ecosystems. The American Naturalist, 161(6),876–888. <doi:10.1086/367590>.
make.cem, make.wfm, make.adjoint, and make.T
.
## compute community effect matrix, and note high prevalence of ambiguous predictions data(cm.dambacher) make.cem(cm.dambacher, out=TRUE) ## compute weighted prediction matrix, and note disambiguation of the cem weighted.predictions(t(cm.dambacher))
## compute community effect matrix, and note high prevalence of ambiguous predictions data(cm.dambacher) make.cem(cm.dambacher, out=TRUE) ## compute weighted prediction matrix, and note disambiguation of the cem weighted.predictions(t(cm.dambacher))