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

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

Arguments

object

joinet object

...

further arguments (not applicable)

Value

This function returns a matrix with \(1+q\) rows and \(q\) columns. The first row contains the intercepts, and the other rows contain the slopes, which are the effects of the outcomes in the row on the outcomes in the column.

Examples

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) weights(object)
#> y1 y2 y3 #> (Intercept) 0.4123532 0.2048455 0.3295532 #> V1 0.3347547 0.7144811 0.4977934 #> V2 0.4795655 0.1919470 0.3724097 #> V3 0.6110722 0.4751144 0.4351376