summary.jointmeta1: Summary function for jointmeta1

Description Usage Arguments Value Examples

View source: R/summary.jointmeta1.R

Description

A function to provide a summary of a jointmeta1.object.

Usage

1
2
## S3 method for class 'jointmeta1'
summary(object, variance = TRUE, ...)

Arguments

object

a jointmeta1.object, the result of fitting a jointmeta1 model

variance

a logical if set to TRUE the variances of the measurement errors and the random effects are returned, else if FALSE then the standard errors are returned.

...

additional arguments; currently none are used.

Value

An object inheriting from class summary.jointmeta1 with all components included in object (see jointmeta1.object).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
   #change example data to jointdata object
   jointdat2<-tojointdata(longitudinal = simdat2$longitudinal,
   survival = simdat2$survival, id = 'id',longoutcome = 'Y',
   timevarying = c('time','ltime'),
   survtime = 'survtime', cens = 'cens',time = 'time')

   #set variables to factors
   jointdat2$baseline$study <- as.factor(jointdat2$baseline$study)
   jointdat2$baseline$treat <- as.factor(jointdat2$baseline$treat)

   #fit multi-study joint model
   #note: for demonstration purposes only - max.it restricted to 5
   #model would need more iterations to truely converge
   onestagefit<-jointmeta1(data = jointdat2, long.formula = Y ~ 1 + time +
                           + treat + study, long.rand.ind = c('int', 'time'),
                           long.rand.stud = c('treat'),
                           sharingstrct = 'randprop',
                           surv.formula = Surv(survtime, cens) ~ treat,
                           study.name = 'study', strat = TRUE, max.it=5)

    #request a summary of the fitted model, with variances printed
    summary(onestagefit, variance = TRUE)

    #request a summary of the fitted model, with standard errors printed
    summary(onestagefit, variance = FALSE)

mesudell/joineRmeta documentation built on Jan. 24, 2020, 6:06 p.m.