Learn R Programming

starnet (version 0.0.7)

weights.starnet: Extract Weights

Description

Extracts coefficients from the meta learner, i.e. the weights for the base learners.

Usage

# S3 method for starnet
weights(object, ...)

Value

Vector containing intercept and slopes from the meta learner.

Arguments

object

starnet object

...

further arguments (not applicable)

Examples

Run this code
# \dontshow{
if(!grepl('SunOS',Sys.info()['sysname'])){
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)
weights(object)}# }
# \donttest{
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)
weights(object)# }

Run the code above in your browser using DataLab