[ede2d4]: / man / projsel.Rd

Download this file

51 lines (46 with data), 1.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/projection.R
\name{projsel}
\alias{projsel}
\title{Forward selection minimizing KL-divergence in projection}
\usage{
projsel(obj, max.iters = 30, start.from = NULL, out.csv = NULL)
}
\arguments{
\item{obj}{Object of class \code{hsstan}.}
\item{max.iters}{Maximum number of iterations (number of predictors selected)
after which the selection procedure should stop.}
\item{start.from}{Vector of variable names to be used in the starting
submodel. If \code{NULL} (default), selection starts from the set of
unpenalized covariates if the model contains penalized predictors,
otherwise selection starts from the intercept-only model.}
\item{out.csv}{If not \code{NULL}, the name of a CSV file to save the
output to.}
}
\value{
A data frame of class \code{projsel} where each row corresponds to a
forward-selected submodel that contains all variables listed up to that row.
Attribute \code{start.from} reports the predictors in the initial model.
The data frame contains the following columns:
\item{var}{names of the variables selected.}
\item{kl}{KL-divergence from the full model to the submodel.}
\item{rel.kl.null}{relative explanatory power of predictors starting from the
intercept-only model.}
\item{rel.kl}{relative explanatory power of predictors starting from the
initial submodel.}
\item{elpd}{the expected log predictive density of the submodels.}
\item{delta.elpd}{the difference in elpd from the full model.}
}
\description{
Forward selection minimizing KL-divergence in projection
}
\examples{
\donttest{
\dontshow{utils::example("hsstan", echo=FALSE)}
\dontshow{oldopts <- options(mc.cores=2)}
# continued from ?hsstan
sel <- projsel(hs.biom, max.iters=3)
plot(sel)
\dontshow{options(oldopts)}
}
}