R/qfsi.R

Defines functions qfsi

Documented in qfsi

qfsi <- function(nfactors, nstat, qscores, zsc_bn, qm) {
  warning("Note that this index is uncommon in Q methodology publications.")
  #calculate FACTOR STABILITY INDEX
  mx <- sum(abs(qscores))*2 #maximum possible position changes
  #qm is the original analysis results
  fsi <- data.frame(FSindex=c(1:nfactors), NFSindex=c(1:nfactors))
  f <- 1
    while (f <= nfactors) {
        fsi[f,1] <- sum(abs(qm[[6]][f]-zsc_bn[f]))/nstat
        fsi[f,2] <- fsi[f,1]/mx
    f <- f+1
    }
  return(fsi)
}

Try the qmethod package in your browser

Any scripts or data that you put into this service are public.

qmethod documentation built on April 1, 2023, 12:18 a.m.