n2kModel
objectR/fit_model.R
, R/fit_model_character.R
, R/fit_model_n2k_aggregate.R
, and 7 more
fit_model.Rd
Fit an n2kModel
object
fit_model(x, ...)
# S4 method for character
fit_model(
x,
base,
project,
status = c("new", "waiting"),
verbose = TRUE,
...,
bucket
)
# S4 method for n2kAggregate
fit_model(x, ...)
# S4 method for n2kComposite
fit_model(x, base, project, status = "new", ...)
# S4 method for n2kHurdleImputed
fit_model(x, base, project, status = c("new", "waiting"), ...)
# S4 method for n2kInla
fit_model(
x,
status = "new",
...,
timeout = NULL,
seed = get_seed(x),
num_threads = NULL,
parallel_configs = TRUE
)
# S4 method for n2kInlaComparison
fit_model(x, base, project, status = "new", verbose = TRUE, ...)
# S4 method for n2kManifest
fit_model(
x,
base,
project,
status = c("new", "waiting"),
verbose = TRUE,
...,
local = tempfile("fit_model"),
first = FALSE
)
# S4 method for n2kModelImputed
fit_model(x, ...)
# S4 method for s3_object
fit_model(x, status = c("new", "waiting"), ...)
the n2kModel
other arguments. See details
The root of a project. Can be either a directory on a file system
or an AWS S3 bucket object.
Extracted from bucket
or x
when missing.
The subdirectory of the project. Is relative the base
.
Extracted from x
when missing.
A vector with status levels naming the levels which should be
calculated.
Defaults to "new"
.
A logical indicating if the function should display the name
of the file and the status.
Defaults to TRUE
.
The name of the AWS S3 bucket.
Only used when base
is missing.
the optional number of second until the model will time out
See the same argument in INLA::inla.qsample()
for further
information.
In order to produce reproducible results, you ALSO need to make sure the RNG
in R is in the same state, see the example in
INLA::inla.posterior.sample()
.
When seed is non-zero, num_threads
is forced to "1:1"
and
parallel_configs
is set to FALSE
, since parallel sampling would not
produce a reproducible sequence of pseudo-random numbers.
The number of threads to use in the format "A:B"
defining the number threads in the outer (A
) and inner (B
) layer for
nested parallelism.
A "0"
will be replaced intelligently.
seed != 0
requires serial computations.
Logical.
If TRUE and not on Windows, then try to run each configuration in parallel
(not Windows) using A
threads (see num_threads
), where each of them is
using B:0
threads.
A local folder into which objects from an AWS S3 bucket are downloaded.
A logical.
first = TRUE
implies to fit only the first object in the manifest with
matching status.
first = FALSE
implies to fit all objects in the manifest with matching
status.
Defaults to FALSE
.
status
: A vector with status levels naming the levels which should be
recalculated.
Defaults to c("new", "waiting")
.
verbose
: A logical indicating if the function should display the name of
the file and the status.
Defaults to TRUE
.