lsem.permutationTest: Permutation Test for a Local Structural Equation Model

View source: R/lsem.permutationTest.R

lsem.permutationTestR Documentation

Permutation Test for a Local Structural Equation Model

Description

Performs a permutation test for testing the hypothesis that model parameter are independent of a moderator variable (see Hildebrandt, Wilhelm, & Robitzsch, 2009; Hildebrandt, Luedtke, Robitzsch, Sommer, & Wilhelm, 2016).

Usage

lsem.permutationTest(lsem.object, B=1000, residualize=TRUE, verbose=TRUE,
     n.core=1, cl.type="PSOCK")

## S3 method for class 'lsem.permutationTest'
summary(object, file=NULL, digits=3, ...)

## S3 method for class 'lsem.permutationTest'
plot(x, type="global", stattype="SD",
    parindex=NULL, sig_add=TRUE, sig_level=0.05, sig_pch=17, nonsig_pch=2,
    sig_cex=1, sig_lab="p value",  stat_lab="Test statistic",
    moderator_lab=NULL, digits=3, title=NULL, parlabels=NULL,
    ask=TRUE, ...)

Arguments

lsem.object

Fitted object of class lsem with lsem.estimate

B

Number of permutation samples

residualize

Optional logical indicating whether residualization of the moderator should be performed for each permutation sample.

verbose

Optional logical printing information about computation progress.

n.core

A scalar indicating the number of cores that should be used.

cl.type

The cluster type. Default value is "PSOCK". Posix machines (Linux, Mac) generally benefit from much faster cluster computation if type is set to type="FORK".

object

Object of class lsem

file

A file name in which the summary output will be written.

digits

Number of digits.

...

Further arguments to be passed.

x

Object of class lsem

type

Type of the statistic to be plotted. If type="global", a global test will be displayed. If type="pointwise" for each value at the focal point (defined in moderator.grid) are calculated.

stattype

Type of test statistics. Can be MAD (mean absolute deviation), SD (standard deviation) or lin_slo (linear slope).

parindex

Vector of indices of selected parameters.

sig_add

Logical indicating whether significance values (p values) should be displayed.

sig_level

Significance level.

sig_pch

Point symbol for significant values.

nonsig_pch

Point symbol for non-significant values.

sig_cex

Point size for graphic displaying p values

sig_lab

Label for significance value (p value).

stat_lab

Label of y axis for graphic with pointwise test statistic

moderator_lab

Label of the moderator.

title

Title of the plot. Can be a vector.

parlabels

Labels of the parameters. Can be a vector.

ask

A logical which asks for changing the graphic for each parameter.

Value

List with following entries

teststat

Data frame with global test statistics. The statistics are SD, MAD and lin_slo with their corresponding p values.

parameters_pointwise_test

Data frame with pointwise test statistics.

parameters

Original parameters.

parameters

Parameters in permutation samples.

parameters_summary

Original parameter summary.

parameters_summary_M

Mean of each parameter in permutation sample.

parameters_summary_SD

Standard deviation (SD) statistic in permutation slope.

parameters_summary_MAD

Mean absolute deviation (MAD) statistic in permutation sample.

parameters_summary_MAD

Linear slope parameter in permutation sample.

nonconverged_rate

Percentage of permuted dataset in which a LSEM model did not converge

Author(s)

Alexander Robitzsch, Oliver Luedtke, Andrea Hildebrandt

References

Hildebrandt, A., Luedtke, O., Robitzsch, A., Sommer, C., & Wilhelm, O. (2016). Exploring factor model parameters across continuous variables with local structural equation models. Multivariate Behavioral Research, 51(2-3), 257-278. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/00273171.2016.1142856")}

Hildebrandt, A., Wilhelm, O., & Robitzsch, A. (2009). Complementary and competing factor analytic approaches for the investigation of measurement invariance. Review of Psychology, 16, 87-102.

See Also

For Examples see lsem.estimate.


sirt documentation built on May 29, 2024, 8:43 a.m.