coef.mp: Coefficients of a Fitted "mp" Object

Description Usage Arguments Value Examples

View source: R/coef.R

Description

This function provides coef method for "mp" class objects.

Usage

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

Arguments

object

A fitted "mp" object returned by "mpersonalized".

...

not used

Value

A list object. Each element in the list is the fitted coefficients corresponding to one penalty parameter value in mp$penalty_parameter_sequence.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(123)
sim_dat  = simulated_dataset(n = 200, problem = "meta-analysis")
Xlist = sim_dat$Xlist; Ylist = sim_dat$Ylist; Trtlist = sim_dat$Trtlist

# fit different rules with SGL penalty for this meta-analysis problem
mp_mod_diff = mpersonalized(problem = "meta-analysis",
                            Xlist = Xlist, Ylist = Ylist, Trtlist = Trtlist,
                            penalty = "SGL", single_rule = FALSE)

mp_coef = coef(mp_mod_diff)
set.seed(NULL)

chenshengkuang/MetaPersonalized documentation built on May 28, 2019, 7:16 p.m.