Learn R Programming

pwSEM (version 1.0.0)

MCX2: Title Monte Carlo chi-square (MCX2)

Description

The maximum likelihood chi-square statistic that is commonly calculated in structural equations modelling only asymptotically follows a theoretical chi-squared distribution; with small sample sizes it can deviate enough from the theoretical distribution to make it problematic.This function estimates the empirical probability distribution of the Maximum Likelihood Chi-Square statistic, given a fixed sample size and degrees of freedom, and outputs the estimated null probability given this sample size and degrees of freedom.

Usage

MCX2(model.df, n.obs, model.chi.square, n.sim = 10000, plot.result = FALSE)

Value

A list containing MCprobability (Monte carlo null probability), and MLprobability (maximum likelihood probability)

Arguments

model.df

the model degrees of freedom

n.obs

the number of observations (lines) in the data set

model.chi.square

the maximum likelihood chi-squared statistic

n.sim

the number of independent simulation runs

plot.result

a graphical output of the result

Examples

Run this code
MCX2(model.df=10,n.obs=15,model.chi.square=18.2,plot.result=TRUE)

Run the code above in your browser using DataLab