gee: Interfaces for gee package for data science pipelines.

Description Usage Arguments Details Value Author(s) Examples

Description

Interfaces to gee functions that can be used in a pipeline implemented by magrittr.

Usage

1

Arguments

data

data frame, tibble, list, ...

...

Other arguments passed to the corresponding interfaced function.

Details

Interfaces call their corresponding interfaced function.

Value

Object returned by interfaced function.

Author(s)

Roberto Bertolusso

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
library(intubate)
library(magrittr)
library(gee)

## ntbt_gee: solve a Generalized Estimation Equation Model
data(warpbreaks)

## Original function to interface
gee(breaks ~ tension, id=wool, data=warpbreaks, corstr="exchangeable")

## The interface puts data as first parameter
ntbt_gee(warpbreaks, breaks ~ tension, id=wool, corstr="exchangeable")

## so it can be used easily in a pipeline.
warpbreaks %>%
  ntbt_gee(breaks ~ tension, id=wool, corstr="exchangeable")

## End(Not run)

Example output

Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27
running glm to get initial regression estimate
(Intercept)    tensionM    tensionH 
   36.38889   -10.00000   -14.72222 

 GEE:  GENERALIZED LINEAR MODELS FOR DEPENDENT DATA
 gee S-function, version 4.13 modified 98/01/27 (1998) 

Model:
 Link:                      Identity 
 Variance to Mean Relation: Gaussian 
 Correlation Structure:     Exchangeable 

Call:
gee(formula = breaks ~ tension, id = wool, data = warpbreaks, 
    corstr = "exchangeable")

Number of observations :  54 

Maximum cluster size   :  27 


Coefficients:
(Intercept)    tensionM    tensionH 
   36.38889   -10.00000   -14.72222 

Estimated Scale Parameter:  141.1481
Number of Iterations:  1

Working Correlation[1:4,1:4]
           [,1]       [,2]       [,3]       [,4]
[1,] 1.00000000 0.02518404 0.02518404 0.02518404
[2,] 0.02518404 1.00000000 0.02518404 0.02518404
[3,] 0.02518404 0.02518404 1.00000000 0.02518404
[4,] 0.02518404 0.02518404 0.02518404 1.00000000


Returned Error Value:
[1] 0
Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27
running glm to get initial regression estimate
(Intercept)    tensionM    tensionH 
   36.38889   -10.00000   -14.72222 

 GEE:  GENERALIZED LINEAR MODELS FOR DEPENDENT DATA
 gee S-function, version 4.13 modified 98/01/27 (1998) 

Model:
 Link:                      Identity 
 Variance to Mean Relation: Gaussian 
 Correlation Structure:     Exchangeable 

Call:
gee(formula = breaks ~ tension, id = wool, data = warpbreaks, 
    corstr = "exchangeable")

Number of observations :  54 

Maximum cluster size   :  27 


Coefficients:
(Intercept)    tensionM    tensionH 
   36.38889   -10.00000   -14.72222 

Estimated Scale Parameter:  141.1481
Number of Iterations:  1

Working Correlation[1:4,1:4]
           [,1]       [,2]       [,3]       [,4]
[1,] 1.00000000 0.02518404 0.02518404 0.02518404
[2,] 0.02518404 1.00000000 0.02518404 0.02518404
[3,] 0.02518404 0.02518404 1.00000000 0.02518404
[4,] 0.02518404 0.02518404 0.02518404 1.00000000


Returned Error Value:
[1] 0
Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27
running glm to get initial regression estimate
(Intercept)    tensionM    tensionH 
   36.38889   -10.00000   -14.72222 

 GEE:  GENERALIZED LINEAR MODELS FOR DEPENDENT DATA
 gee S-function, version 4.13 modified 98/01/27 (1998) 

Model:
 Link:                      Identity 
 Variance to Mean Relation: Gaussian 
 Correlation Structure:     Exchangeable 

Call:
gee(formula = breaks ~ tension, id = wool, data = ., corstr = "exchangeable")

Number of observations :  54 

Maximum cluster size   :  27 


Coefficients:
(Intercept)    tensionM    tensionH 
   36.38889   -10.00000   -14.72222 

Estimated Scale Parameter:  141.1481
Number of Iterations:  1

Working Correlation[1:4,1:4]
           [,1]       [,2]       [,3]       [,4]
[1,] 1.00000000 0.02518404 0.02518404 0.02518404
[2,] 0.02518404 1.00000000 0.02518404 0.02518404
[3,] 0.02518404 0.02518404 1.00000000 0.02518404
[4,] 0.02518404 0.02518404 0.02518404 1.00000000


Returned Error Value:
[1] 0

intubate documentation built on May 30, 2017, 5:49 a.m.