Simulation theory Flashcards
Why are simulations useful? (3)
you can use them to really understand what is going on.
Furthermore, you can:
- Validate statistical models (cross-validation, bootstrapping)
- Estimate the precision of sample statistics (bootstrapping)
- Conduct significance testing (permutation test (aka exact test), randomisation test, re-randomisation test) by switching the y data round while x stays the same.
What is meant by parametric
and non-parametric bootstrapping?
Parametric bootstrap refers to sampling from an assumed theoretical distribution (e.g. null). Meanwhile non-parametric bootstrapping takes the form of resampling. However, bootstrapping can take many forms!
What is meant by chaos in statistics?
Parametric bootstrap refers to sampling from an assumed theoretical distribution (e.g. null). Meanwhile non-parametric bootstrapping takes the form of resampling. However, bootstrapping can take many forms!
What is meant by chaos in statistics?
Parametric bootstrap refers to sampling from an assumed theoretical distribution (e.g. null). Meanwhile non-parametric bootstrapping takes the form of resampling. However, bootstrapping can take many forms!
What is meant by chaos in statistics?
Parametric bootstrap refers to sampling from an assumed theoretical distribution (e.g. null). Meanwhile non-parametric bootstrapping takes the form of resampling. However, bootstrapping can take many forms!
Why is chaos theory not that useful in psychology?
We often have too much noise to find such effects
What is the behaviour of complex systems generally determined by?
Another aspect of complex systems is that, although they come in all shapes and sizes, generally the behaviour of complex systems is determined by the number and the types of stable and unstable equilibrium points (attractor landscape).
These landscapes are invariant (only quantitative changes) within certain ranges of control parameter values. At bifurcation points the landscapes change qualitatively (type and or number of attractors change)
Why do you have to think about the stable system of a state?
They are normally in some stable state and they change a little bit when you change the environment of the system or some external variables. With some changes in variables you can have a sudden change - a tipping to a new equilibrium state (e.g from 0 to 25 on the red line or 0 to 50 on the green line in the above graph.) Therefore when you think about a system you have to think about its stable state and how often they change.
How can these systems be visualised?
The behaviour of complex systems are characterised by the number of stable states, and their types. The former can be visualised with a bifurcation diagram.
What is meant by a catastrophe?
A sudden change in stable state is termed a catastrophe.
What is meant by hysteresis?
Complex systems often have to characteristic of hysteresis where different amounts of energy (analogy: activation energy) is required to switch stable state compared to when it previously changed.
Ice at 0 degrees jumps to the state of water, however water has a certain ‘lagging behind’ where it can get to -4 degrees until it jumps to the ice state and freezes. It only jumps from the current state when it cannot delay anymore; this property of phase transitions is called hysteresis.
What is meant by self organisation? Give an example
Spontaneous self-organisation can also be at times seen, where there are local rules resulting in global organisation. A process where some form of overall order arises from local interactions between parts of an initially disordered system. (birds, neurons)
What are meant by nodes and edges?
In networks, the measured variables are termed nodes and their connections as edges.
After analysis how are the weights matrix of the edges interpreted?
After analysis, the interpretation of the weights matrix of the edges are simplified by a number of measures offered:
- Betweenness (centrality) - # of shortest paths that go through the node
- Closeness (centrality) - inverse of sum of shortest paths of the node
- Degree (centrality) - sum of absolute input weights of the node
- Cluster measures (multiple algorithms)
What does factor models does G Theory assume?
Either multiple factors or higher order factor theory (e.g one factor causing the other factors)
What defines a dynamical system?
The value of the next timestep is the function of its previous number
e.g x(t+1) = r * x(t)
This is also a difference equation
In the model xt+1 = r xt (K-xt)/K
What do x and K represent?
What happens when xt «_space;K?
What happens when xt is close to K?
x represents the starting amount of rabbits, K the maximum amount
What happens when xt «_space;K?
K doesn’t have much of an impact on xt, it still grows exponentially.
What happens when xt is close to K?
K has a big effect, repressing the exponential growth of xt.
In the model xt+1 = r xt (K-xt)/K:
What do x and K represent?
What happens when xt is close to K?
What is the role of r?
What do x and K represent?
x represents the starting amount of rabbits and K represents the maximum capacity of rabbits
What happens when xt «_space;K?
K does not play much of a factor and xt still grows exponentially
What happens when xt is close to K?
K plays a big role and suppresses the exponential growth of xt
What role did we find out r plays in the model?
r=0.8 dies out. r=1.5 results in one stable state. r=2.9 overshoots and then is stable. r=3.2 jumps between two stable states. r=3.5 jumps between 4 stable states. r=3.9 results in chaos. r=4.1 jumps out of bounds.
What role did we find out r plays in the model?
r=0.8 dies out. r=1.5 results in one stable state. r=2.9 overshoots and then is stable. r=3.2 jumps between two stable states. r=3.5 jumps between 4 stable states. r=3.9 results in chaos. r=4.1 jumps out of bounds.
What is meant by positive manifold in regards to intelligence?
The different factors have positive relations with each other
What is one the x and y axis of a bifurcation diagram?
x = Values of r y = values of x
What do these lines of code mean?
dancers=rep(0,n)
dancers[1:1]=1
number_of_dancers=rep(0, iterations)
No one dances
But one guy dances
This keeps track of the numbers of dancers
What does this line of code do?
for(i in 1: iterations){
number_of_dancers[i]=sum(dancers)
dancers[threshold
Keep track of the number of dancers
If the proportion of dancers is higher than my threshold, I dance
What happened when we made the distribution of the threshold of dancers bimodal? What were the alpha and beta values?
Converges to less than 100% of dancers, e.g. 50% dancers.
Choose alpha < 1 and beta < 1. One possibility: alpha = .5 and beta = .5. One possibility: alpha = .5 and beta = .5
Why would it be a mistake to conduct a study with student participants regarding the positive manifold?
Too similar: ceiling effect
What is teh biological or psychological unitary origin of psychometric g
A century of research did not lead to a clear answer!
•No consensus on the origin of g
•Advocates of g never state precisely what they think of the origin of g
Whats an alternative to the higher order network model of g?
Mutualism in networks:
Why some ecosystems are more healthy than others is not a matter of single magical hidden factor
•Mathematical biology: Systems of coupled differential systems
•Simple case: Lotka Volterra competition model
An example of a network is the Lotka Volterra mutalism model where to the usual logistic growth, influences from other nodes are added depending on a matrix of interaction weights. Different factor structures can be well-replicated by changing the matrix of interaction weights in mutualism.
Apply the mutualism model to a hypothetical cognitive version
Suppose the cognitive system consists of basic functions that develop over time and strengthen each other in this developmental processes, would that also give rise to the positive manifold, typical for general intelligence?
Break down the meaning of this dynamical equation:
dxi/dt = aixi(1-xi/Ki) +aiE(n,j = 1 j=/= i) Mijxj*xi/Ki
dxi/dt means the change in xi over t
ai*xi(1-xi/Ki) is the logistic growth
aiE(n,j = 1 j=/= i) Mijxjxi/Ki is the mutualism part of the model
ai*xi represents the growth factor
Ki represents the limited capacity
M is the matrix of interaction weights
What does the mutualistic part ‘say’?
aiE(n,j = 1 j=/= i) Mijxjxi/Ki
I’m going to sum over t from 1 to n, and from all the other processes I get some extra input. How much of this is specified in the matrix M
aiE(n,j = 1 j=/= i) Mijxjxi/Ki
This is a differential equation, not a difference equation as in the chaos example. What does this mean for time?
Note this is a differential equation (continious time) and not a difference equation (discrete time, Chaos example)
Difference is time step, should be very small
•In that case no chaos!
What graph shape does this model take?
As long as the r value is high enough, always exponential growth before levelling out
How is M set up in python?
Creating an interaction matrix. The simplest case is an M where all the values are equal (e.g all 0.1: M = np.ones((var, var))*.1). The diagonal must always be set to 0 (np.fill_diagonal(M, 0) ). You then simulate data from a normal distribution for x0, a and k:
x0 = stats.norm.rvs(0.2, 0.1, var) a = stats.norm.rvs(0.4, 0.05, var) k = stats.norm.rvs(10, 2, var)
You then run the equation in a for loop:
for i in range(1, n): x[:, i] = x[:, i-1] + dt * (a * x[:, i-1] * (1-x[:, i-1] / k) + a * x[:, i - 1] * M @ x[:, i - 1] / k)
The @ carries out matrix multiplication.
Once we’ve ran the mutualism model for one person, what’s the next step?
Carry out the factor analysis: take a measurement for each factor (e.g cognitive skills). Do this for multiple people: keep n the same but different a, k values etc. We now have a data matrix which we can now run factor analysis
When running this code, all the values centre around one value. What determines this value?
K: The limited capacity
What value should be for dt?
Very low number but not too low as it can be too slow to run the code, 0.1 is risky and 0.00001 is inefficient.
0.001 is prolly cool
What do you have to import to run the mutualism model?
GEKKO
What did running this code demonstrate
That you can get a positive manifold from a mutualistic model, essentially we don’t know anymore.
g theory currently assumes either multiple factors or a higher order factor structure.
Describe how to fit this model in JASP beginning with python
First we generate these kind of structures in the mutualistic model. First you make an m matrix, where it is all zeroes except for a diagonal run of three blocks with positive values (apart from the 0 values in the diagonal line). The low = 0.001 or something similar, high is = 0.2.