coef.multiview {multiview}R Documentation

Extract coefficients from a multiview object

Description

Extract coefficients from a multiview object

Usage

## S3 method for class 'multiview'
coef(object, s = NULL, ...)

Arguments

object

Fitted "multiview" object.

s

Value(s) of the penalty parameter lambda at which predictions are required. Default is the entire sequence used to create the model.

...

This is the mechanism for passing arguments like ⁠x=⁠ when exact=TRUE; see exact argument.

Value

a matrix of coefficients for specified lambda.

Examples

# Gaussian
x = matrix(rnorm(100 * 20), 100, 20)
z = matrix(rnorm(100 * 10), 100, 10)
y = rnorm(100)
fit1 = multiview(list(x=x,z=z), y, rho = 0)
coef(fit1, s=0.1)

# Binomial
by = sample(c(0,1), 100, replace = TRUE)
fit2 = multiview(list(x=x,z=z), by, family = binomial(), rho=0.5)
coef(fit2, s=0.1)

# Poisson
py = matrix(rpois(100, exp(y))) 
fit3 = multiview(list(x=x,z=z), py, family = poisson(), rho=0.5)
coef(fit3, s=0.1)


[Package multiview version 0.8 Index]