Package 'SBSDiff'

Title: Satorra-Bentler Scaled Chi-Squared Difference Test
Description: Calculates a Satorra-Bentler scaled chi-squared difference test between nested models that were estimated using maximum likelihood (ML) with robust standard errors, which cannot be calculated the traditional way. For details see Satorra & Bentler (2001) <doi:10.1007/bf02296192> and Satorra & Bentler (2010) <doi:10.1007/s11336-009-9135-y>. This package may be particularly helpful when used in conjunction with 'Mplus' software, specifically when implementing the complex survey option. In such cases, the model estimator in 'Mplus' defaults to ML with robust standard errors.
Authors: Frank D. Mann <[email protected]>
Maintainer: Frank D. Mann <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-12-24 06:47:28 UTC
Source: CRAN

Help Index


Satorra-Bentler Scaled Chi-Squared Difference Test (Based on Chi-Squared Values)

Description

Takes chi-squared values from nested models estimated using maximum likelihood with robust standard errors, model degrees of freedom, scaling correlation factors and returns: (1) change in model chi-squared (2) change in model degrees of freedom and (3) the probability of rejecting the null.

Usage

sbs.chi(chi0, chi1, df0, df1, c0, c1)

Arguments

chi0

chi-squared value for the more restrictive model

chi1

chi-squared value for the less restrictive model

df0

degrees of freedom for the more restrictive model (with more degrees of freedom)

df1

degrees of freedom for the less restrictive model (with fewer degrees of freedom)

c0

scaling correction factor for the more restrictive model

c1

scaling correction factor for the less restrictive model

Value

Change in model chi-squared, change in model degrees of freedom and the probability of rejecting the null

Examples

chi0 <- 50

chi1 <- 40

df0 <- 10

df1 <- 9

c0 <- 1

c1 <- 1

sbs.chi(chi0,chi1,df0,df1,c0,c1)

Satorra-Bentler Scaled Chi-Squared Difference Test (Based on Loglikelihood Values)

Description

Takes loglikelihood values from nested models estimated using maximum likelihood with robust standard errors, number of free parameters, scaling correlation factors and returns: (1) Satorra-Bentler scaled change in model chi-squared (2) change in model degrees of freedom and (3) the probability of rejecting the null.

Usage

sbs.log(L0, L1, p0, p1, c0, c1)

Arguments

L0

loglikelihood value for the more restrictive model (should be a negatige value)

L1

loglikelihood value for the less restrictive model (should be a negatige value)

p0

number of free parameters for the more restrictive model (with fewer freely estimated parameters)

p1

number of free parametersfor the less restrictive model (with more freely estimated parameters)

c0

scaling correction factor for the more restrictive model

c1

scaling correction factor for the less restrictive model

Value

Change in model chi-squared, change in model degrees of freedom and the probability of rejecting the null

Examples

L0 <- -50

L1 <- -45

p0 <- 9

p1 <- 10

c0 <- 1

c1 <- 1

sbs.log(L0,L1,p0,p1,c0,c1)