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