Metastability and Eye Movements: A Dynamical‑Systems Interpretation

  1. Why metastability is a natural language for gaze behavior The idea that perception, attention, and neural activity evolve through transiently stable states has deep roots in cognitive science and neuroscience. Concepts such as attractors , basins , noise‑induced transitions , and escape times appear in work on perceptual switching, decision‑making, and neural population dynamics (Kelso, 1995; Rabinovich et al., 2008; Deco & Jirsa, 2012). Eye movements, especially the alternation between fixations and saccades ,   fit remarkably well into this metastable picture. The Freidlin–Wentzell theory of rare events (Freidlin & Wentzell, 2012) provides a rigorous mathematical language for these intuitions. 2. Fixations as metastable states  Consider the gaze position X t as the state of a stochastic dynamical system. During a fixation the  gaze remains confined to a small region, microsaccades and noise generate small fluctuations, and the gaze tends to return...

R function ci_sigma

The function ci_sigma evaluates the  confidence interval of variance and standard deviation  for populations that are approximately normal. ci_sigma takes two arguments:

  • x: a vector of data.
  • alpha: significance level (default = 0.05).

The function checks if the input data is approximately normal using the Shapiro-Francia test from the nortest package. If the hypothesis of normality is not satisfied at the given significance level, it suggests trying a log-transformation and performs the Shapiro-Francia test again. If the hypothesis of normality is satisfied, it calculates critical values from the chi-squared distribution and uses them to calculate confidence intervals for both variance and standard deviation.

The function returns a list containing five elements:

  • VAR: variance of input data.
  • SD: standard deviation of input data.
  • CI.VAR: confidence interval for variance.
  • CI.SD: confidence interval for standard deviation.
  • dof: degrees of freedom.

Here is an example usage of this function:

x <- rnorm(100, mean = 10, sd = 2)

ci_sigma(x)


#CONFIDENCE INTERVAL OF STANDARD DEVIATION

#For populations that are approximately normal

ci_sigma<- function(x,alpha=0.05) {

  #x:          vector of data

  #alpha:      significance level (default=0.05)

 

  n<- length(x)

 

  #check normality

  library(nortest)

  out<-sf.test(x)

  out

 

  if(out$p.value<alpha) {

    print("the hypothesis of normality is not satisfied. Try log-trasformation")

    sf.test(log(x))

  } else {

    #critical values from the chi-squared distribution

    u.low<- qchisq(alpha/2,n-1,lower.tail=FALSE)

    u.up<- qchisq(1-alpha/2,n-1,lower.tail=FALSE)

   

    ci.var.low<- (n-1)*var(x)/u.low

    ci.var.up<- (n-1)*var(x)/u.up

   

    ci.var<- c(ci.var.low,ci.var.up)

    ci.std<- sqrt(ci.var)

   

    return(list(VAR=var(x),SD=sd(x),CI.VAR=ci.var,CI.SD=ci.std,dof=n-1))

  }

}

 


Comments

Popular posts from this blog

Understanding Anaerobic Threshold (VT2) and VO2 Max in Endurance Training

Diagnosing Singular Fits in Linear Mixed Models: Practical Examples, Code, and Alternatives

Owen's Function: A Simple Solution to Complex Problems