Skip to content

Commit 263ff51

Browse files
committed
adjust example
1 parent 4e0e6c6 commit 263ff51

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

R/multipleGroup.R

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@
125125
#' # limited information fit statistics
126126
#' M2(mod_configural)
127127
#'
128-
#' mod_metric <- multipleGroup(dat, 1, group = group, invariance=c('slopes')) #equal slopes
128+
#' mod_metric <- multipleGroup(dat, 1, group = group,
129+
#' invariance=c('slopes', 'free_var')) #equal slopes
129130
#' # equal intercepts, free variance and means
130131
#' mod_scalar2 <- multipleGroup(dat, 1, group = group,
131132
#' invariance=c('slopes', 'intercepts', 'free_var','free_means'))
@@ -151,7 +152,7 @@
151152
#' itemplot(mod_configural, 2)
152153
#' itemplot(mod_configural, 2, type = 'RE')
153154
#'
154-
#' anova(mod_metric, mod_configural) #equal slopes only
155+
#' anova(mod_metric, mod_configural) #equal slopes
155156
#' anova(mod_scalar2, mod_metric) #equal intercepts, free variance and mean
156157
#' anova(mod_scalar1, mod_scalar2) #fix mean
157158
#' anova(mod_fullconstrain, mod_scalar1) #fix variance
@@ -342,7 +343,8 @@
342343
#'
343344
#' # EM approach (not as accurate with 3 factors, but generally good for quick model comparisons)
344345
#' mod_configural <- multipleGroup(dat, model, group = group) #completely separate analyses
345-
#' mod_metric <- multipleGroup(dat, model, group = group, invariance=c('slopes')) #equal slopes
346+
#' mod_metric <- multipleGroup(dat, model, group = group,
347+
#' invariance=c('slopes', 'free_var')) #equal slopes
346348
#' mod_fullconstrain <- multipleGroup(dat, model, group = group, #equal means, slopes, intercepts
347349
#' invariance=c('slopes', 'intercepts'))
348350
#'
@@ -351,7 +353,8 @@
351353
#'
352354
#' # same as above, but with MHRM (generally more accurate with 3+ factors, but slower)
353355
#' mod_configural <- multipleGroup(dat, model, group = group, method = 'MHRM')
354-
#' mod_metric <- multipleGroup(dat, model, group = group, invariance=c('slopes'), method = 'MHRM')
356+
#' mod_metric <- multipleGroup(dat, model, group = group,
357+
#' invariance=c('slopes', 'free_var'), method = 'MHRM')
355358
#' mod_fullconstrain <- multipleGroup(dat, model, group = group, method = 'MHRM',
356359
#' invariance=c('slopes', 'intercepts'))
357360
#'

man/multipleGroup.Rd

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)