4.3 Poisson Regression
If the response is integer, poisson regression will be run (or specified with type = 'poisson'
).
pembrolizumab$Counts <- rpois(nrow(pembrolizumab),lambda = 3)
rm_uvsum(data=pembrolizumab, response='Counts',covs=c('age','cohort'))
RR(95%CI) | p-value | N | |
---|---|---|---|
age | 1.00 (0.99, 1.01) | 0.49 | 94 |
cohort | 94 | ||
A | Reference | 16 | |
B | 0.85 (0.55, 1.31) | 0.45 | 18 |
C | 1.23 (0.83, 1.84) | 0.31 | 18 |
D | 0.89 (0.55, 1.43) | 0.63 | 12 |
E | 0.91 (0.63, 1.35) | 0.64 | 30 |
offset terms can be specified as well, but must correspond to a variable in the data set
pembrolizumab$length_followup <- rnorm(nrow(pembrolizumab),mean = 72,sd=3)
pembrolizumab$log_length_followup <- log(pembrolizumab$length_followup)
rm_uvsum(data=pembrolizumab, response='Counts',covs=c('age','cohort'),
offset = "log_length_followup")
RR(95%CI) | p-value | N | |
---|---|---|---|
age | 1.00 (0.99, 1.01) | 0.47 | 94 |
cohort | 94 | ||
A | Reference | 16 | |
B | 0.85 (0.55, 1.32) | 0.47 | 18 |
C | 1.26 (0.85, 1.88) | 0.26 | 18 |
D | 0.90 (0.55, 1.44) | 0.67 | 12 |
E | 0.93 (0.64, 1.37) | 0.70 | 30 |