refit | R Documentation |
Run the supplied graphical model function on the whole dataset and refit with the selected lambda(s)
refit(obj, criterion)
obj |
a fitted |
criterion |
a character vector of criteria for refitting on full data. An optimal index must be defined for each criterion or a message will displayed. If missing (no argument is supplied), try to refit for all pre-specified criteria. |
The refit
call is evaluated in the environment specified by the pulsar
or batch.pulsar
object, so if any variables were used for arguments to the original call, unless they are purposefully updated, should not be altered. For example, if the variable for the original data is reassigned, the output of refit
will not be on the original dataset.
a pulsar.refit
S3 object with members:
est: the raw output from the graphical model function, fun
, applied to the full dataset.
refit: a named list of adjacency matrices, for each optimal criterion in obj
or specified in the criterion
argument.
fun: the original function used to estimate the graphical model along the lambda path.
pulsar
batch.pulsar
## Generate the data with huge:
## Not run:
library(huge)
set.seed(10010)
p <- 40 ; n <- 1200
dat <- huge.generator(n, p, "hub", verbose=FALSE, v=.1, u=.3)
lams <- getLamPath(getMaxCov(dat$data), .01, len=20)
## Run pulsar with huge
hugeargs <- list(lambda=lams, verbose=FALSE)
out.p <- pulsar(dat$data, fun=huge::huge, fargs=hugeargs,
rep.num=20, criterion='stars')
fit <- refit(out.p)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.