Learn R Programming

REREFACT (version 1.0)

correct_alpha: Re-orders and/or re-signs as needed within the estimated intercept or mean vector for each replication

Description

The correct_alpha function accomplishes Step 4 of the algorithm with regard to replications of the estimated intercept or mean vector. More specifically, the correct_alpha function re-orders and/or re-signs as needed within the estimated intercept or mean vector for each replication so that all replications uniformly follow the order and sign pattern defined by the population values.

Usage

correct_alpha(P_data, rep, n.eta, sample_alpha)

Arguments

P_data
a list containing the correct permutation matrix, P_i, for each replication.

rep
the number of replications.
n.eta
the total number of latent variables within eta.
sample_alpha
a list containing replications of the estimated intercept or mean vector.

Details

The correct_alpha function uses P to re-order and/or re-sign as needed within the estimated intercept or mean vector for each replication of a simulation study with exploratory factor analysis. This function returns a list, correct_alpha, of the re-ordered and/or re-signed estimated intercept or mean vector for each replication and saves the list as a text file to the designated working directory.

References

Myers, N. D., Ahn, S., Lu, M., Celimli, S., Zopluoglu, C. (2016). REREFACT: An R package for reordering and reflecting factors for simulation studies with Exploratory Factor Analysis. Manuscript submitted for publication.

See Also

rerefact, correct_beta, correct_lambda, correct_psi, correct_gamma

Examples

Run this code
# Load the P for Example 2 from Myers, Ahn, Lu, Celimli, and Zopluoglu (2016).

data(P_esem)

# Load 200 replications of the estimated intercept or mean vector provided by replication 
# numbers 1 through 100 and 4701 through 4800 in Example 2 from 
# Myers, Ahn, Lu, Celimli, and Zopluoglu (2016).

data(sample_alpha_esem)

# Specify the following arguments within the correct_alpha function for Example 2 from 
# Myers, Ahn, Lu, Celimli, and Zopluoglu (2016).

correct_alpha(P_data=P_esem, rep=200, n.eta=4, sample_alpha=sample_alpha_esem)

Run the code above in your browser using DataLab