Description Usage Arguments Value Author(s) References See Also Examples
A wrapper function for using the factanal
function predictively. Several methods are available for exploring the predictions of fitted factor analysis models.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | factanal.predictive(x, factors, ...)
## S3 method for class 'factanal.predictive'
AIC(object, ..., k = 2, corrected = TRUE)
## S3 method for class 'factanal.predictive'
biplot(x, newdata, axes=c(1,2),
which.var=1:x$n.vars, ...)
## S3 method for class 'factanal.predictive'
deviance(object, ...)
## S3 method for class 'factanal.predictive'
logLik(object, ...)
## S3 method for class 'factanal.predictive'
pairs(x, vars = 1:x$n.vars, ls = FALSE, ...)
## S3 method for class 'factanal.predictive'
predict(object, newdata, responses = c(1),
predictors = (1:object$n.vars)[-responses], ...)
## S3 method for class 'factanal.predictive'
scores(x, newdata, which.var=1:x$n.vars, ...)
## S3 method for class 'factanal.predictive'
screeplot(x, stat = "deviance", shift = TRUE,
plot = TRUE, ylab, main, grey.int=0.8, ...)
|
x |
For |
object |
An object of class |
factors |
Number of factors to be fitted. |
k |
Not used. Included for consistency with the default method. |
corrected |
If |
axes |
Vector of length 2 containing the numbers associated with the axes to be plotted. If the model contains only a single factor (i.e. axis), then random 'jitter' is plotted on the y-axis to improve visualisation of the plotted factor on the x-axis. If more than two axes are supplied, the first two are used with a |
vars |
Vector giving the numbers associated with the variables to be plotted. Must contain at least two variables. |
ls |
If TRUE, the least-squares fit is also shown for comparison. |
newdata |
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used. |
responses |
Vector giving the numbers associated with the variables to be treated as 'responses'. |
predictors |
Vector giving the numbers associated with the variables to be treated as 'predictors'. |
which.var |
Vector giving the numbers associated with the variables to be used in axis calculation. |
stat |
Character string of the name of a function that returns a statistic quantifying the 'performance' of a fitted |
shift |
If |
plot |
If |
ylab |
Label for the y-axis. If omitted the label is taken to be |
main |
Title for screeplot |
grey.int |
Grey colour for 'within ten units' region. |
... |
For |
An object of class factanal.predictive
that includes the following components, in addition to those that are included in factanal
objects:
factors |
Either the number of factors in the model or "full" if the number of factors exceeds the maximum number for a factor analysis. If this number is exceeded, a "full" multivariate normal model is fitted that treats all covariances and variances as free parameters. |
n.obs |
Number of observations (i.e. rows in x). |
Cor |
The model-implied correlation matrix. |
call.pred |
The matched call to |
n.vars |
Number of variables (i.e. columns in x). |
x |
Data matrix passed to |
Cov |
The model-implied covariance matrix. |
B |
Unstandardized coefficients. |
Steve Walker
Walker, S.C. and Jackson, D.A. (2011) Random-effects ordination: describing and predicting multivariate correlations and co-occurrences. Ecological Monographs. 81: 635-663.
This function is based on factanal
. For random-effects ordination of presence-absence data see ltm.ecol
.
1 2 | limn.fa <- factanal.predictive(limn,2)
scores(limn.fa)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.