drop1_fmx | R Documentation |
Fit fmx models with a single parameters being added or dropped.
## S3 method for class 'fmx'
drop1(object, ...)
## S3 method for class 'fmx'
add1(object, ...)
object |
fmx object |
... |
additional parameters, currently not in use. |
..
Functions drop1.fmx and add1.fmx return a list of fmx objects, in the reverse order of model selection.
Functions drop1.fmx and add1.fmx do not
return an anova table, like other
stats:::drop.*
or stats:::add1.*
functions do.
step
# donttest to save time
library(fmx)
(d2 = fmx('GH', A = c(1,6), B = 1.2, g = c(0,.3), h = c(.2,0), w = c(1,2)))
set.seed(312); hist(x2 <- rfmx(n = 1e3L, dist = d2))
system.time(m0 <- QLMDe(x2, distname = 'GH', K = 2L, constraint = c('g1', 'g2', 'h1', 'h2')))
system.time(m1 <- QLMDe(x2, distname = 'GH', K = 2L, constraint = c('g1', 'h2')))
system.time(m2 <- QLMDe(x2, distname = 'GH', K = 2L)) # ~2 secs
d1 = drop1(m1)
d1 # NULL
d2 = drop1(m2)
vapply(d2, FUN = getTeX, FUN.VALUE = '')
a0 = add1(m0)
vapply(a0, FUN = getTeX, FUN.VALUE = '')
a1 = add1(m1)
vapply(a1, FUN = getTeX, FUN.VALUE = '')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.