找回密码
 注册
查看: 6175|回复: 0

R语言:factanal()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-17 09:58:30 | 显示全部楼层 |阅读模式
factanal(stats)
factanal()所属R语言包:stats

                                        Factor Analysis
                                         因素分析

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Perform maximum-likelihood factor analysis on a covariance matrix or data matrix.
执行的可能性最大协方差矩阵或数据矩阵的因子分析。


用法----------Usage----------


factanal(x, factors, data = NULL, covmat = NULL, n.obs = NA,
         subset, na.action, start = NULL,
         scores = c("none", "regression", "Bartlett"),
         rotation = "varimax", control = NULL, ...)



参数----------Arguments----------

参数:x
A formula or a numeric matrix or an object that can be coerced to a numeric matrix.
一个公式或数字矩阵或一个对象可以强制转换为一个数字矩阵。


参数:factors
The number of factors to be fitted.
要安装的多项因素。


参数:data
An optional data frame (or similar: see model.frame), used only if x is a formula.  By default the variables are taken from environment(formula).
一个可选的数据框(或类似:model.frame),仅用于x如果是一个公式。默认情况下采取的变量从environment(formula)。


参数:covmat
A covariance matrix, or a covariance list as returned by cov.wt.  Of course, correlation matrices are covariance matrices.
协方差矩阵或协列表返回cov.wt。当然,相关矩阵的协方差矩阵。


参数:n.obs
The number of observations, used if covmat is a covariance matrix.
的若干意见,使用covmat如果是协方差矩阵。


参数:subset
A specification of the cases to be used, if x is used as a matrix or formula.
规格的情况下被使用,如果x作为一个矩阵或公式中使用。


参数:na.action
The na.action to be used if x is used as a formula.
na.action如果x公式中使用。


参数:start
NULL or a matrix of starting values, each column giving an initial set of uniquenesses.
NULL或初始值的矩阵,每一列初始设置的独特性。


参数:scores
Type of scores to produce, if any.  The default is none, "regression" gives Thompson's scores, "Bartlett" given Bartlett's weighted least-squares scores. Partial matching allows these names to be abbreviated.
分数型生产,如果有的话。默认是没有"regression"给汤普森的成绩,"Bartlett"巴特利特加权最小二乘分数。部分匹配,允许这些名称的缩写。


参数:rotation
character. "none" or the name of a function to be used to rotate the factors: it will be called with first argument the loadings matrix, and should return a list with component loadings giving the rotated loadings, or just the rotated loadings.
字符。 "none"或一个函数的名称,用于旋转的因素:它会被称为第一个参数的载荷矩阵,并应该返回与组件loadings旋转负荷,或只是一个列表旋转负荷。


参数:control
A list of control values,     
控制值的列表,

nstartThe number of starting values to be tried if start = NULL. Default 1.  
起始值nstartThe如果start = NULL受审。默认为1。

tracelogical. Output tracing information? Default FALSE.  
tracelogical。输出跟踪信息?默认FALSE。

lowerThe lower bound for uniquenesses during optimization. Should be > 0. Default 0.005.  
lowerThe较低的优化过程中的独特性约束。应该是0。默认0.005。

optA list of control values to be passed to optim's control argument.  
OPTA的控制值的列表可以通过optim的control参数。

rotatea list of additional arguments for the rotation function.     
rotatea旋转功能的额外的参数列表。


参数:...
Components of control can also be supplied as named arguments to factanal.
control组件也可以提供命名参数factanal。


Details

详情----------Details----------

The factor analysis model is
因子分析模型

for a p–element row-vector x, a p x k matrix Λ of loadings, a k–element vector f of scores and a p–element vector eof errors.  None of the components other than x is observed, but the major restriction is that the scores be uncorrelated and of unit variance, and that the errors be independent with variances Psi, the uniquenesses.  It is also common to scale the observed variables to unit variance, and done in this function.
p元素的行向量x,p x k矩阵Λ负荷,k元素矢量f分数和p元素向量e的错误。比x其他组件没有被观察到,但主要的限制是不相关分数和单位方差,错误是独立与差异Psi,独特性。这也是常见的扩展观测变量方差,在这个函数中完成。

Thus factor analysis is in essence a model for the correlation matrix of x,
因此,因子分析在本质上是一个x相关矩阵模型,

There is still some indeterminacy in the model for it is unchanged if Λ is replaced by G Λ for any orthogonal matrix G.  Such matrices G are known as rotations (although the term is applied also to non-orthogonal invertible matrices).
还有一些模型的不确定性,它是不变的Λ如果G Λ取代任何正交矩阵G。这样的矩阵G被称为旋转(虽然该术语也适用于非正交可逆矩阵)。

If covmat is supplied it is used.  Otherwise x is used if it is a matrix, or a formula x is used with data to construct a model matrix, and that is used to construct a covariance matrix.  (It makes no sense for the formula to have a response, and all the variables must be numeric.)  Once a covariance matrix is found or calculated from x, it is converted to a correlation matrix for analysis.  The correlation matrix is returned as component correlation of the result.
如果covmat提供使用它。否则x如果是x构建一个模型矩阵,用来构建一个协方差矩阵是一个矩阵,或公式data。 (它使没有意义的公式有一个回应,和所有的变量必须是数字。)一旦被发现或从x计算协方差矩阵,它被转换为相关矩阵进行分析。相关矩阵组件correlation结果返回。

The fit is done by optimizing the log likelihood assuming multivariate normality over the uniquenesses.  (The maximizing loadings for given uniquenesses can be found analytically: Lawley & Maxwell (1971, p. 27).)  All the starting values supplied in start are tried in turn and the best fit obtained is used.  If start = NULL then the first fit is started at the value suggested by J鰎eskog (1963) and given by Lawley & Maxwell (1971, p. 31), and then control$nstart - 1 other values are tried, randomly selected as equal values of the uniquenesses.
适合做多元常态假设的独特性,优化日志的可能性。 (对于给定的独特性,最大限度地负荷可以发现分析:罗礼与麦克斯韦(1971年,第27页))中提供的所有出发值start依次尝试,并获得最合适的。“如果start = NULL然后第一适合开始由J·reskog(1963)建议的价值,并给予罗礼与麦克斯韦(1971年,第31页),然后control$nstart - 1其他值都试过,随机选择的独特性的价值相等。

The uniquenesses are technically constrained to lie in [0, 1], but near-zero values are problematical, and the optimization is done with a lower bound of control$lower, default 0.005 (Lawley & Maxwell, 1971, p. 32).
在技术上的独特性约束趴在[0, 1],但接近零值是有问题的,和下界的优化control$lower,默认0.005(罗礼及麦克斯韦,1971年,P。 32)。

Scores can only be produced if a data matrix is supplied and used. The first method is the regression method of Thomson (1951), the second the weighted least squares method of Bartlett (1937, 8). Both are estimates of the unobserved scores f.  Thomson's method regresses (in the population) the unknown f on x to yield
成绩只能生产,供应和使用,如果一个数据矩阵。第一种方法是汤姆森回归法(1951年),第二加权最小二乘方法巴特利特(1937年8)。都是f观测到分数的估计。汤姆森的方法回归(人口)未知的上fx产生

and then substitutes the sample estimates of the quantities on the right-hand side.  Bartlett's method minimizes the sum of squares of standardized errors over the choice of f, given (the fitted) Λ.
然后样品的数量估计在右侧的替代品。巴特利特的方法,最大限度地减少了在f选择的标准化误差平方的总和,(装)Λ。

If x is a formula then the standard NA-handling is applied to the scores (if requested): see napredict.
如果x然后标准NA处理的被应用到的分数(如果要求)的公式:napredict。

The print method (documented under loadings) follows the factor analysis convention of drawing attention to the patterns of the results, so the default precision is three decimal places, and small loadings are suppressed.
print方法(记录下loadings)如下因素分析公约提请注意结果的模式,所以默认精度是小数点后三位,抑制小负荷。


值----------Value----------

An object of class "factanal" with components
一个对象的类"factanal"组件


参数:loadings
A matrix of loadings, one column for each factor.  The factors are ordered in decreasing order of sums of squares of loadings, and given the sign that will make the sum of the loadings positive.  This is of class "loadings": see loadings for its print method.
一个负荷矩阵,每个因子的一列。为了减少载荷的平方和的因素排序,并给定的,这将使负荷的总和积极的迹象。这类"loadings":看到loadingsprint方法。


参数:uniquenesses
The uniquenesses computed.
计算出的独特性。


参数:correlation
The correlation matrix used.
使用的相关矩阵。


参数:criteria
The results of the optimization: the value of the negative log-likelihood and information on the iterations used.
优化的结果:负日志的可能性,并使用迭代的信息的价值。


参数:factors
The argument factors.
参数factors。


参数:dof
The number of degrees of freedom of the factor analysis model.
因子分析模型的自由度数。


参数:method
The method: always "mle".
方法:总是"mle"。


参数:rotmat
The rotation matrix if relevant.
旋转矩阵,如果相关。


参数:scores
If requested, a matrix of scores.  napredict is applied to handle the treatment of values omitted by the na.action.
如果有要求,矩阵的分数。 napredict的治疗na.action遗漏值处理。


参数:n.obs
The number of observations if available, or NA.
如果若干意见,或NA。


参数:call
The matched call.
匹配的呼叫。


参数:na.action
If relevant.
如果相关。


参数:STATISTIC, PVAL
The significance-test statistic and P value, if if can be computed.
意义检验统计量和P值,如果,如果可以计算。


注意----------Note----------

There are so many variations on factor analysis that it is hard to compare output from different programs.  Further, the optimization in maximum likelihood factor analysis is hard, and many other examples we compared had less good fits than produced by this function.  In particular, solutions which are "Heywood cases" (with one or more uniquenesses essentially zero) are much often common than most texts and some other programs would lead one to believe.
有这么多的变化因素分析,这是很难比较不同方案的输出。此外,在最大似然性因素分析的优化是很难的,和许多其他的例子,我们比较有此功能不太好,比千篇一律。尤其是要经常共同的解决方案是“海沃德例”(一个或多个独特性,基本上是零),比大多数文本和其他一些程序会导致人相信。


参考文献----------References----------

British Journal of Psychology, 28, 97–104.
factors. Nature, 141, 609–610.
Statistical Estimation in Factor Analysis.  Almqvist and Wicksell.
Statistical Method. Second edition. Butterworths.
London University Press.

参见----------See Also----------

loadings (which explains some details of the print method), varimax, princomp, ability.cov, Harman23.cor, Harman74.cor.
loadings(解释的print方法的一些细节),varimax,princomp,ability.cov,Harman23.cor,Harman74.cor。

Other rotation methods are available in various contributed packages, including GPArotation and psych.
其他旋转的方法,可以在各种贡献的软件包,包括GPArotation和psych。


举例----------Examples----------


# A little demonstration, v2 is just v1 with noise,[一个小示范,v2是只是噪声V1,]
# and same for v4 vs. v3 and v6 vs. v5[和同为V4和V3和V6与V5]
# Last four cases are there to add noise[过去四年的情况有增加噪声]
# and introduce a positive manifold (g factor)[并提出了积极的流形(g因子)]
v1 <- c(1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,4,5,6)
v2 <- c(1,2,1,1,1,1,2,1,2,1,3,4,3,3,3,4,6,5)
v3 <- c(3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,5,4,6)
v4 <- c(3,3,4,3,3,1,1,2,1,1,1,1,2,1,1,5,6,4)
v5 <- c(1,1,1,1,1,3,3,3,3,3,1,1,1,1,1,6,4,5)
v6 <- c(1,1,1,2,1,3,3,3,4,3,1,1,1,2,1,6,5,4)
m1 <- cbind(v1,v2,v3,v4,v5,v6)
cor(m1)
factanal(m1, factors = 3) # varimax is the default[最大方差是默认]
factanal(m1, factors = 3, rotation = "promax")
# The following shows the g factor as PC1[下面显示了作为PC1的g因子]
prcomp(m1)

## formula interface[#配方接口]
factanal(~v1+v2+v3+v4+v5+v6, factors = 3,
         scores = "Bartlett")$scores

## a realistic example from Bartholomew (1987, pp. 61-65)[#从巴塞洛缪的现实的例子(1987年,第61-65)]
utils::example(ability.cov)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-23 00:58 , Processed in 0.025798 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表