Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/cran/nFactors
07 July 2025, 09:21:26 UTC
  • Code
  • Branches (48)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/1.0
    • refs/tags/2.1
    • refs/tags/2.2
    • refs/tags/2.3
    • refs/tags/2.3.1
    • refs/tags/2.3.2
    • refs/tags/2.3.3
    • refs/tags/2.3.3.1
    • refs/tags/2.4.1
    • refs/tags/2.4.1.1
    • refs/tags/2.4.1.2
    • refs/tags/R-2.10.0
    • refs/tags/R-2.10.1
    • refs/tags/R-2.11.0
    • refs/tags/R-2.11.1
    • refs/tags/R-2.12.0
    • refs/tags/R-2.12.1
    • refs/tags/R-2.12.2
    • refs/tags/R-2.13.0
    • refs/tags/R-2.13.1
    • refs/tags/R-2.13.2
    • refs/tags/R-2.14.0
    • refs/tags/R-2.14.1
    • refs/tags/R-2.14.2
    • refs/tags/R-2.15.0
    • refs/tags/R-2.15.1
    • refs/tags/R-2.15.2
    • refs/tags/R-2.15.3
    • refs/tags/R-2.4.0
    • refs/tags/R-2.4.1
    • refs/tags/R-2.5.0
    • refs/tags/R-2.5.1
    • refs/tags/R-2.6.0
    • refs/tags/R-2.6.1
    • refs/tags/R-2.6.2
    • refs/tags/R-2.7.0
    • refs/tags/R-2.7.1
    • refs/tags/R-2.7.2
    • refs/tags/R-2.8.0
    • refs/tags/R-2.8.1
    • refs/tags/R-2.9.0
    • refs/tags/R-2.9.1
    • refs/tags/R-2.9.2
    • refs/tags/R-3.0.0
    • refs/tags/R-3.0.1
    • refs/tags/R-3.0.2
    • refs/tags/R-3.0.3
    No releases to show
  • 1f3de83
  • /
  • man
  • /
  • generateStructure.rd
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:3b7e7d8e566fec273ff5ba544ca541188923ad0b
origin badgedirectory badge
swh:1:dir:c790f1e33a5232044be137009743a5c8e7692d25
origin badgerevision badge
swh:1:rev:875465dbb701152a2de23d9377cbe4c2604c4ad0
origin badgesnapshot badge
swh:1:snp:33d11d715b0cba7ecd7b351a330349ccf3fdae77

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 875465dbb701152a2de23d9377cbe4c2604c4ad0 authored by Gilles Raiche on 14 October 2009, 00:00:00 UTC
version 2.3.1
Tip revision: 875465d
generateStructure.rd
\name{generateStructure}
\alias{generateStructure}
\title{ Generate a Factor Structure Matrix.}

\description{
 The \code{generatStructure} function return a \emph{mjc} factor structure matrix.
 The number of variables per major factor \emph{pmjc} is equal for each factor.
 The argument \emph{pmjc} must be divisible by \emph{nVar}.
 The arguments are strongly inspired from Zick and Velicer (1986, p. 435-436) methodology.
 }

\usage{
 generateStructure(var, mjc, pmjc, loadings, unique)
 }

\arguments{
  \item{var}{      numeric: number of variables}
  \item{mjc}{      numeric: number of major factors (factors with practical significance) }
  \item{pmjc}{     numeric: number of variables that load significantly on each major factor }
  \item{loadings}{ numeric: loadings on the significant variables on each major factor }
  \item{unique}{   numeric: loadings on the non significant variables on each major factor }
 }

\value{
  \item{values}{ numeric matrix: factor structure }
 }

\seealso{
 \code{\link{principalComponents}},
 \code{\link{iterativePrincipalAxis}},
 \code{\link{rRecovery}}
 }

\references{
  Zwick, W. R. and Velicer, W. F. (1986). Comparison of five rules for
   determining the number of components to retain. \emph{Psychological Bulletin,
   99}, 432-442.
 }

\author{ 
    Gilles Raiche \cr
    Centre sur les Applications des Modeles de Reponses aux Items (CAMRI) \cr
    Universite du Quebec a Montreal\cr
    \email{raiche.gilles@uqam.ca}, \url{http://www.er.uqam.ca/nobel/r17165/}
 }

\examples{
# .......................................................
# Example inspired from Zwick and Velicer (1986, table 2, p. 437)
## ...................................................................
 unique=0.2; loadings=0.5
 zwick1 <- generateStructure(var=36, mjc=6, pmjc= 6, loadings=loadings,
                             unique=unique)
 zwick2 <- generateStructure(var=36, mjc=3, pmjc=12, loadings=loadings,
                             unique=unique)
 zwick3 <- generateStructure(var=72, mjc=9, pmjc= 8, loadings=loadings,
                             unique=unique)
 zwick4 <- generateStructure(var=72, mjc=6, pmjc=12, loadings=loadings,
                             unique=unique)
 sat=0.8
## ...................................................................
 zwick5 <- generateStructure(var=36, mjc=6, pmjc= 6, loadings=loadings,
                             unique=unique)
 zwick6 <- generateStructure(var=36, mjc=3, pmjc=12, loadings=loadings,
                             unique=unique)
 zwick7 <- generateStructure(var=72, mjc=9, pmjc= 8, loadings=loadings,
                             unique=unique)
 zwick8 <- generateStructure(var=72, mjc=6, pmjc=12, loadings=loadings,
                             unique=unique)
## ...................................................................

# nsubjects <- c(72, 144, 180, 360)
# require(psych)
# Produce an usual correlation matrix from a congeneric model
 nsubjects <- 72
 mzwick5   <- sim.structure(fx=as.matrix(zwick5), n=nsubjects)
 mzwick5$r

# Factor analysis: recovery of the factor structure
 iterativePrincipalAxis(mzwick5$model, nFactors=6,
                        communalities="ginv")$loadings
 iterativePrincipalAxis(mzwick5$r    , nFactors=6,
                        communalities="ginv")$loadings
 factanal(covmat=mzwick5$model,         factors=6)
 factanal(covmat=mzwick5$r    ,         factors=6)
 
# Number of components to retain
 eigenvalues  <- eigen(mzwick5$r)$values
 aparallel    <- parallel(var      = length(eigenvalues),
                          subject  = nsubjects,
                          rep      = 30,
                          quantile = 0.95,
                          model="components")$eigen$qevpea
 results <- nScree(x         = eigenvalues,
                   aparallel = aparallel)
 results$Components
 plotnScree(results)
 
# Number of factors to retain
 eigenvalues.fa  <- eigen(corFA(mzwick5$r))$values
 aparallel.fa    <- parallel(var      = length(eigenvalues.fa),
                             subject  = nsubjects,
                             rep      = 30,
                             quantile = 0.95,
                             model="factors")$eigen$qevpea
 results.fa <- nScree(x      = eigenvalues.fa,
                   aparallel = aparallel.fa,
                   model     ="factors")
 results.fa$Components
 plotnScree(results.fa)
# ......................................................
 }

\keyword{ multivariate }

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API