coef.joinet: Extract Coefficients

Description Usage Arguments Value Examples

View source: R/functions.R

Description

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

Usage

1
2
## S3 method for class 'joinet'
coef(object, ...)

Arguments

object

joinet object

...

further arguments (not applicable)

Value

This function returns the pooled coefficients. The slot alpha contains the intercepts in a vector of length q, and the slot beta contains the slopes in a matrix with p rows (inputs) and q columns.

Examples

1
2
3
4
5
6
7
## Not run: 
n <- 50; p <- 100; q <- 3
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
Y <- replicate(n=q,expr=rnorm(n=n,mean=rowSums(X[,1:5])))
object <- joinet(Y=Y,X=X)
coef <- coef(object)
## End(Not run)

joinet documentation built on Aug. 9, 2021, 9:13 a.m.