blimp.update | R Documentation |
This function updates specific input command sections of a misty.object
of type blimp
to create an updated Blimp input file, run the updated
input file by using the blimp.run()
function, and print the updated
Blimp output file by using the blimp.print()
function.
blimp.update(x, update, file = "Blimp_Input_Update.imp", comment = FALSE,
replace.inp = TRUE, blimp.run = TRUE, posterior = FALSE,
folder = "Posterior_",
format = c("csv", "csv2", "xlsx", "rds", "RData"),
clear = TRUE, replace.out = c("always", "never", "modified"),
Blimp = detect.blimp(),
result = c("all", "default", "algo.options", "data.info",
"model.info", "warn.mess", "out.model", "gen.param"),
exclude = NULL, color = c("none", "blue", "violet"),
style = c("bold", "regular"), not.result = TRUE,
write = NULL, append = TRUE, check = TRUE, output = TRUE)
x |
|
update |
a character vector containing the updated input command sections. |
file |
a character string indicating the name of the updated Blimp
input file with or without the file extension |
comment |
logical: if |
replace.inp |
logical: if |
blimp.run |
logical: if |
posterior |
logical: if |
folder |
a character string indicating the prefix of the folder for
saving the posterior distributions. The default setting is
|
format |
a character vector indicating the file format(s) for saving the
posterior distributions, i.e., |
clear |
logical: if |
replace.out |
a character string for specifying three settings:
|
Blimp |
a character string for specifying the name or path of the Blimp executable to be used for running models. This covers situations where Blimp is not in the system's path, or where one wants to test different versions of the Blimp program. Note that there is no need to specify this argument for most users since it has intelligent defaults. |
result |
a character vector specifying Blimp result sections included
in the output (see 'Details' in the |
exclude |
a character vector specifying Blimp input command or result
sections excluded from the output (see 'Details' in the
|
color |
a character vector with two elements indicating the colors
used for headers (e.g., |
style |
a character vector with two elements indicating the style
used for headers (e.g., |
not.result |
logical: if |
write |
a character string naming a file for writing the output into
a text file with file extension |
append |
logical: if |
check |
logical: if |
output |
logical: if |
data |
a matrix or data frame from which the variables names for
the section |
The function is used to update following Blimp input sections:
DATA
VARIABLES
CLUSTERID
ORDINAL
NOMINAL
COUNT
WEIGHT
MISSING
LATENT
RANDOMEFFECT
TRANSFORM
BYGROUP
FIXED
CENTER
MODEL
SIMPLE
PARAMETERS
TEST
FCS
SIMUALTE
SEED
BURN
ITERATIONS
CHAINS
NIMPS
THIN
OPTIONS
OUTPUT
SAVE
---;
SpecificationThe ---;
specification
is used to remove entire sections (e.g., CENTER: ---;
) from the Blimp
input. Note that ---;
including the semicolon ;
needs to be
specified, i.e., ---
without the semicolon ;
will result in an
error message.
Returns an object of class misty.object
, which is a list with following
entries:
call |
function call |
type |
type of analysis |
x |
|
update |
a character vector containing the updated Blimp input command sections |
args |
specification of function arguments |
write |
updated write command sections |
result |
list with result sections ( |
Takuya Yanagida
Keller, B. T., & Enders, C. K. (2023). Blimp user’s guide (Version 3). Retrieved from www.appliedmissingdata.com/blimp
blimp.run
, blimp.print
, blimp.plot
, blimp.bayes
## Not run:
#----------------------------------------------------------------------------
# Example 1a: Update BURN and ITERATIONS section
# Specify Blimp input
input <- '
DATA: data1.csv;
ORDINAL: d;
MISSING: 999;
FIXED: d;
CENTER: x1 x2;
MODEL: y ~ x1 x2 d;
SEED: 90291;
BURN: 1000;
ITERATIONS: 10000;
'
# Run Blimp input
mod0 <- blimp(input, file = "Ex4.3.imp", clear = FALSE)
# Update sections
update1 <- '
BURN: 5000;
ITERATIONS: 20000;
'
# Run updated Blimp input
mod1 <- blimp.update(mod0, update1, file = "Ex4.3_update1.imp")
#----------------------------------------------------------------------------
# Example 1b: Remove CENTER section
# Remove section
update2 <- '
CENTER: ---;
'
# Run updated Blimp input
mod2 <- blimp.update(mod1, update2, file = "Ex4.3_update2.imp")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.