View source: R/GenerateBoxData.R
GenerateBoxData | R Documentation |
Generate data for Thurstone's 20 variable and 26 variable Box Study From length, width, and height box measurements.
GenerateBoxData(
XYZ,
BoxStudy = 20,
Reliability = 0.75,
ModApproxErrVar = 0.1,
SampleSize = NULL,
NMinorFac = 50,
epsTKL = 0.2,
Seed = 1,
SeedErrorFactors = 2,
SeedMinorFactors = 3,
PRINT = FALSE,
LB = FALSE,
LBVal = 1,
Constant = 0
)
XYZ |
(Matrix) Length, width, and height measurements for N boxes. The Amazon Box data
can be accessed by calling |
BoxStudy |
(Integer) If BoxStudy = 20 then data will be generated for
Thurstone's classic 20 variable box problem. If BoxStudy = 26 then data will
be generated for Thurstone's 26 variable box problem. Default: |
Reliability |
(Scalar [0, 1] ) The common reliability value for each measured variable. Default: Reliability = .75. |
ModApproxErrVar |
(Scalar [0, 1] ) The proportion of reliable
variance (for each variable) that is due to all minor common factors.
Thus, if |
SampleSize |
(Integer) Specifies the number of boxes to be sampled from
the population. If |
NMinorFac |
(Integer) The number of minor factors to use while
generating model approximation error. Default: |
epsTKL |
(Numeric [0, 1]) A parameter of the
Tucker, Koopman, and Linn (1969) algorithm that controls the spread of the influence of the minor factors.
Default: |
Seed |
(Integer) Starting seed for box sampling. |
SeedErrorFactors |
(Integer) Starting seed for the error-factor scores. |
SeedMinorFactors |
(Integer) Starting seed for the minor common-factor scores. |
PRINT |
(Logical) If PRINT = TRUE then the computed reliabilites will
be printed. Default: |
LB |
(lower bound; logical) If LB = TRUE then minimum box measurements will be set to LBVal (inches) if they fall below 0 after adding measurement error. If LB = FALSE then negative attribute values will not be modified. This argument has no effect on data that include model approximation error. |
LBVal |
(Numeric) If |
Constant |
(Numeric) Optional value to add to all box measurements.
Default: |
This function can be used with the Amazon boxes dataset (data(AmzBoxes)
) or with any collection
of user-supplied scores on three variables. The Amazon Boxes data were downloaded from the
BoxDimensions
website: (https://www.boxdimensions.com/). These data contain
length (x), width (y), and height (z) measurements for 98 Amazon shipping boxes. In his
classical monograph on Multiple Factor Analysis (Thurstone, 1947) Thurstone describes two data sets
(one that he created from fictitious data and a second data set that he created from actual box measurements)
that were used to illustrate topics in factor analysis. The first (fictitious) data set is
known as the Thurstone Box problem (see Kaiser and Horst, 1975). To create his data for the Box problem,
Thurstone constructed 20 nonlinear combinations of fictitious length, width, and height measurements.
Box20 variables:
x^2
y^2
z^2
xy
xz
yz
sqrt(x^2 + y^2)
sqrt(x^2 + z^2)
sqrt(y^2 + z^2)
2x + 2y
2x + 2z
2y + 2z
log(x)
log(y)
log(z)
xyz
sqrt(x^2 + y^2 + z^2)
exp(x)
exp(y)
exp(z)
The second Thurstone Box problem contains measurements on the following 26 functions of length, width, and height. Box26 variables:
x
y
z
xy
xz
yz
x^2 * y
x * y^2
x^2 * z
x * z^ 2
y^2 * z
y * z^2
x/y
y/x
x/z
z/x
y/z
z/y
2x + 2y
2x + 2z
2y + 2z
sqrt(x^2 + y^2)
sqrt(x^2 + z^2)
sqrt(y^2 + z^2)
xyz
sqrt(x^2 + y^2 + z^2)
Note that when generating unreliable data (i.e., variables with reliability values less than 1) and/or data with model error, SampleSize must be greater than NMinorFac.
XYZ The length (x), width (y), and height (z) measurements for the sampled boxes.
If SampleSize = NULL
then XYZ
contains the x, y, z values for the
original 98 boxes.
BoxData Error free box measurements.
BoxDataE Box data with added measurement error.
BoxDataEME Box data with added (reliable) model approximation and (unreliable) measurement error.
Rel.E Classical reliabilities for the scores in BoxDataE
.
Rel.EME Classical reliabilities for the scores in BoxDataEME
.
NMinorFac Number of minor common factors used to generate BoxDataEME
.
epsTKL Minor factor spread parameter for the Tucker, Koopman, Linn algorithm.
SeedErrorFactors Starting seed for the error-factor scores.
SeedMinorFactors Starting seed for the minor common-factor scores.
Niels G. Waller (nwaller@umn.edu)
Cureton, E. E. & Mulaik, S. A. (1975). The weighted varimax rotation and the promax rotation. Psychometrika, 40(2), 183-195. Kaiser, H. F. and Horst, P. (1975). A score matrix for Thurstone's box problem. Multivariate Behavioral Research, 10(1), 17-26.
Thurstone, L. L. (1947). Multiple Factor Analysis. Chicago: University of Chicago Press.
Tucker, L. R., Koopman, R. F., and Linn, R. L. (1969). Evaluation of factor analytic research procedures by means of simulated correlation matrices. Psychometrika, 34(4), 421-459.
Other Factor Analysis Routines:
BiFAD()
,
Box26
,
Ledermann()
,
SLi()
,
SchmidLeiman()
,
faAlign()
,
faEKC()
,
faIB()
,
faLocalMin()
,
faMB()
,
faMain()
,
faScores()
,
faSort()
,
faStandardize()
,
faX()
,
fals()
,
fapa()
,
fareg()
,
fsIndeterminacy()
,
orderFactors()
,
print.faMB()
,
print.faMain()
,
promaxQ()
,
summary.faMB()
,
summary.faMain()
data(AmzBoxes)
BoxList <- GenerateBoxData (XYZ = AmzBoxes[,2:4],
BoxStudy = 20,
Reliability = .75,
ModApproxErrVar = .10,
SampleSize = 300,
NMinorFac = 50,
epsTKL = .20,
Seed = 1,
SeedErrorFactors = 1,
SeedMinorFactors = 2,
PRINT = FALSE,
LB = FALSE,
LBVal = 1,
Constant = 0)
BoxData <- BoxList$BoxData
RBoxes <- cor(BoxData)
fout <- faMain(R = RBoxes,
numFactors = 3,
facMethod = "fals",
rotate = "geominQ",
rotateControl = list(numberStarts = 100,
standardize = "CM"))
summary(fout)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.