as.data.frame.wald: Transform output of a Wald test into a data frame

Usage Arguments Examples

View source: R/wald.R

Usage

1

Arguments

obj
se

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
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (obj, se = FALSE) 
{
    if (length(obj) == 1) {
        if (is.null(dd <- obj[[1]]$data)) 
            return(NULL)
        cf <- obj[[1]]$coef
        ret <- if (is.logical(se)) {
            if (se) 
                data.frame(dd, coef = cf, se = obj[[1]]$se)
            else data.frame(dd, coef = cf)
        }
        else if (se > 0) {
            data.frame(dd, coef = cf, coefp = cf + se * obj[[1]]$se, 
                coefm = cf - se * obj[[1]]$se, se = obj[[1]]$se)
        }
    }
    else ret <- sapply(obj, as.data.frame.wald)
    ret
  }

gmonette/spida documentation built on May 17, 2019, 7:25 a.m.