sjt.pca(data, nmbr.fctr = NULL, fctr.load.tlrn = 0.1, title = "Principal Component Analysis (with varimax rotation)", var.labels = NULL, wrap.labels = 40, show.cronb = TRUE, show.msa = FALSE, show.var = FALSE, altr.row.col = FALSE, digits = 2, string.pov = "Proportion of Variance", string.cpov = "Cumulative Proportion", CSS = NULL, encoding = NULL, file = NULL, use.viewer = TRUE, no.output = FALSE, remove.spaces = TRUE)
data.frame
that should be used to compute a PCA, or a prcomp
object.NULL
and the amount of factors is
calculated according to the Kaiser-criteria.title = NULL
, hence no title will be used.TRUE
(default), the cronbach's alpha value for each factor scale will be calculated,
i.e. all variables with the highest loading for a factor are taken for the
reliability test. The result is an alpha value for each factor dimension.
Only applies when data
is a data frame and no prcomp
object.TRUE
, shows an additional column with the measure of sampling adequacy according
dor each component.TRUE
, the proportions of variances for each component as well as cumulative
variance are shown in the table footer.TRUE
, alternating rows are highlighted with a light gray
background color.list
-object with user-defined style-sheet-definitions, according to the
official CSS syntax. See 'Details'.NULL
, so encoding will be auto-detected
depending on your platform (e.g., "UTF-8"
for Unix and "Windows-1252"
for
Windows OS). Change encoding if specific chars are not properly displayed (e.g. German umlauts).NULL
(default), the output will be saved as temporary file and
openend either in the IDE's viewer pane or the default web browser.TRUE
, the HTML table is shown in the IDE's viewer pane. If
FALSE
or no viewer available, the HTML table is opened in a web browser.TRUE
, the html-output is neither opened in a browser nor shown in
the viewer pane and not even saved to file. This option is useful when the html output
should be used in knitr
documents. The html output can be accessed via the return
value.TRUE
, leading spaces are removed from all lines in the final string
that contains the html-data. Use this, if you want to remove parantheses for html-tags. The html-source
may look less pretty, but it may help when exporting html-tables to office tools.page.style
),
page.content
),
output.complete
),
knitr
),
factor.index
, i.e. the column index of each variable with the highest factor loading for each factor and
removed.items
, i.e. which variables have been removed because they were outside of the fctr.load.tlrn
's range.
sjt.frq
.
## Not run:
# # Data from the EUROFAMCARE sample dataset
# library(sjmisc)
# data(efc)
#
# # retrieve variable and value labels
# varlabs <- get_label(efc)
#
# # recveive first item of COPE-index scale
# start <- which(colnames(efc) == "c82cop1")
# # recveive last item of COPE-index scale
# end <- which(colnames(efc) == "c90cop9")
#
# # create data frame with COPE-index scale
# mydf <- as.data.frame(efc[, c(start:end)])
# colnames(mydf) <- varlabs[c(start:end)]
#
# sjt.pca(mydf)
#
# # auto-detection of labels
# sjt.pca(efc[, c(start:end)])## End(Not run)
Run the code above in your browser using DataLab