Learn R Programming

starnet (version 0.0.3)

coef.starnet: Extract Coefficients

Description

Extracts pooled coefficients. (The meta learners weights the coefficients from the base learners.)

Usage

# S3 method for starnet
coef(object, nzero = NULL, ...)

Arguments

object

starnet object

nzero

maximum number of non-zero coefficients: positive integer, or NULL

...

further arguments (not applicable)

Value

List of scalar alpha and vector beta, containing the pooled intercept and the pooled slopes, respectively.

Examples

Run this code
# NOT RUN {
set.seed(1)
n <- 50; p <- 100
y <- rnorm(n=n)
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
object <- starnet(y=y,X=X)
coef <- coef(object)

# }

Run the code above in your browser using DataLab