enumRsimulation: enumR simulation function

Description Usage Arguments Value

Description

This function simulates factor analyses based on numerous parameters, listed below.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
enumRsimulation(seed = 12345, ndatasets = 200, patternmatrix = NULL,
  effectmatrix = NULL, nfactors = 5, loading = 0.5, items = NULL,
  items_p_f = 5, itemsR_p_f = 2, itemsR = NULL, loading_norm = FALSE,
  loading_norm_sd = 0.05, rfactors = 0, r_norm = FALSE,
  r_norm_SD = 0.015, samplesize = 300, method = "ml",
  rotation = "oblimin", custom_item = FALSE, f1_items = NULL,
  f2_items = NULL, f3_items = NULL, f4_items = NULL, f5_items = NULL,
  f6_items = NULL, f7_items = NULL, f8_items = NULL, f9_items = NULL,
  f10_items = NULL, f1_itemsR = NULL, f2_itemsR = NULL,
  f3_itemsR = NULL, f4_itemsR = NULL, f5_itemsR = NULL,
  f6_itemsR = NULL, f7_itemsR = NULL, f8_itemsR = NULL,
  f9_itemsR = NULL, f10_itemsR = NULL)

Arguments

seed

numeric value for setting a seed. Allows results to be reproduced.

ndatasets

Number of datasets generated

patternmatrix

OPTIONAL matrix of factor loadings. If not provided, one is generated from rfactors and nfactors.

effectmatrix

OPTIONAL matrix of item loadings by factor. If not provided, one is generated from items and nfactors.

nfactors

Number of factors to extract.

loading

Factor loading magnitude. Default is .5

items_p_f

number of items per factor

itemsR_p_f

number of reverse-scored items per factor

itemsR

Number of items per factor that are reverse scored

loading_norm

If TRUE, generate factor loadings that average to loading

loading_norm_sd

If loading_norm is TRUE, standard deviation of loadings.

rfactors

Intercorrelations between factors. Default is 0

r_norm

If TRUE, generate normally distributed factor loadings with mean loading and sd r_norm_sd. Does not check if correlation matrix is positive definite.

samplesize

Number of observations

method

factoring method – fm="pa" Principal Axis Factor Analysis, fm = "minres" minimum residual (OLS) factoring fm="ml" Maximum Likelihood FA, fm="pc" Principal Components"

rotation

what rotation to use c("none", "varimax", "oblimin","promax")

custom_item

If TRUE, overrides items_p_f and itemsR_p_f. Primary used for importing from shiny interface. @param items OPTIONAL vector of total number of items per factor

f1_items

Total number of items on factor 1

f2_items

Total number of items on factor 2

f3_items

Total number of items on factor 3

f4_items

Total number of items on factor 4

f5_items

Total number of items on factor 5

f6_items

Total number of items on factor 6

f7_items

Total number of items on factor 7

f8_items

Total number of items on factor 8

f9_items

Total number of items on factor 9

f10_items

Total number of items on factor 10

f1_itemsR

Number of reverse-scored items on factor 1

f2_itemsR

Number of reverse-scored items on factor 2

f3_itemsR

Number of reverse-scored items on factor 3

f4_itemsR

Number of reverse-scored items on factor 4

f5_itemsR

Number of reverse-scored items on factor 5

f6_itemsR

Number of reverse-scored items on factor 6

f7_itemsR

Number of reverse-scored items on factor 7

f8_itemsR

Number of reverse-scored items on factor 8

f9_itemsR

Number of reverse-scored items on factor 9

f10_itemsR

Number of reverse-scored items on factor 10 ... parameters to pass to the factor analysis program The most important of these is if using a correlation matrix is covmat= xx

cor

What kind of correlation to find, defaults to covariance matrix, but see fa for the choices

r_norm_sd

If r_norm is TRUE, standard deviation for normally distributed intercorrelations.

true_model

If TRUE, Estimates model using nfactors only. Is used in enumRsimulation function. Default is FALSE.

use

If doing covariances or Pearson R, should we use "pairwise" or "complete cases"

items_p_f

number of items per factor

itemsR_p_f

number of reverse-scored items perfactor

custom_item

If TRUE, overrides items_p_f and itemsR_p_f. Primary used for importing from shiny interface.

Value

dataframe


smasongarrison/enumR documentation built on May 24, 2019, 7:19 a.m.