confint.jointmeta1SE: Extract confidence intervals

Description Usage Arguments Value See Also Examples

View source: R/confint.jointmeta1SE.R

Description

confint returns the bootstrapped confidence intervals from a jointmeta1SE object, which holds the results of bootstrapping the fit from a jointmeta1 function fit.

Usage

1
2
## S3 method for class 'jointmeta1SE'
confint(object, parm = NULL, level = 0.95, ...)

Arguments

object

A jointmeta1SE object - the result of running the bootstrapping function jointmetaSE on a jointmeta1 object

parm

A vector indicating what parameters to return confidence intervals for. This should either be a vector of character strings, where any parameters matching the supplied parameters have their estimates and confidence intervals returned, or a numeric or integer vector of values indicating what rows of the results of the bootstapping procedure to print out

level

A numerical value greater than 0 and less than 1 that indicates the requireed level of the confidence interval. The default is level = 0.95 giving 95% confidence intervals.

...

additional arguments; currently none are used.

Value

Returns the name of variables, the part of the joint model they relate to (sub-model, variance parameter...), their estimate and their 95% confidence interval

See Also

jointmeta1

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
26
27
28
   #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 3
   #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=3)

    ## Not run: 
        #calculate the SE
        onestagefitSE <- jointmetaSE(fitted = onestagefit, n.boot = 200)

        #extract confidence intervals
        confint(onestagefitSE)
    
## End(Not run)

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