Description Usage Arguments Details Value Author(s) References See Also Examples

This function fits binomial additive hazards models subject to linear inequality constraints using the function `constrOptim`

in the `stats`

package for binary outcomes. Additionally, it calculates the cause-specific contributions to the disability prevalence based on the attribution method, as proposed by Nusselder and Looman (2004).

1 2 3 4 5 |

`formula` |
A formula expression of the form response ~ predictors, similar to other regression models. In case of |

`data` |
an optional data frame or matrix containing the variables in the model. If not found in |

`subset` |
an optional vector specifying a subset of observations to be used in the fitting process. All observations are included by default. |

`weights` |
an optional vector of survey weights to be used in the fitting process. |

`na.action` |
a function which indicates what should happen when the data contain NAs. The default is set by the |

`model` |
logical. If |

`contrasts` |
an optional list to be used for some or all of the factors appearing as variables in the model formula. |

`start` |
logical. Will the user provide starting values? Default is |

`start.val` |
vector of the starting values. They should be provided if |

`attrib` |
logical. Should the attribution of disability to chronic diseases/conditions be calculated? Default is |

`attrib.var` |
character indicating the name of the attribution variable to be used if |

`type.attrib` |
type of attribution to be calculated. The options are |

`set.seed` |
logical. Should a random seed be set? Default is |

`seed` |
integer indicating the random seed. Only valid if |

`bootstrap` |
logical. Should bootstrap percentile confidence intervals be calculated for the parameters and attributions? Default is |

`nbootstrap` |
integer. Number of bootstrap replicates. |

`parallel` |
logical. Should parallel calculations be used to obtain the bootstrap percentile confidence intervals? Only valid if |

`type.parallel` |
type of parallel operation to be used (if |

`ncpus` |
integer. Number of processes to be used in parallel operation: typically one would choose this to be the number of available CPUs. Default is 4. |

`...` |
other arguments passed to or from the other functions. |

The model is a generalized linear model with a non-canonical link function, which requires a restriction on the linear predictor (*η ≥ 0*) to produce valid probabilities. This restriction is implemented in the optimization procedure, with an adaptive barrier algorithm, using the function `constrOptim`

in the `stats`

package.

The variance-covariance matrix is based on the observed information matrix.

This version of the the package only allows the calculation of non-parametric bootstrap percentile confidence intervals (CI), which are based on the 2.5 and 97.5 percentiles. Also, the function gives the user the option to do parallel calculation of the bootstrap CI. The `snow`

parallel option is available for all operating systems (Windows, Linux, and Mac OS) while the `multicore`

option is only available for Linux and Mac OS systems. These two calculations are done by calling the `boot`

function in the `boot`

package. For more details, see the documentation of the `boot`

package.

More information about the binomial additive hazards model and the calculation of the contribution of chronic conditions to the disability prevalence can be found in the references.

A list with arguments:

`coefficients` |
numeric vector with the regression coefficients. |

`ci` |
confidence intervals calculated via bootstraping (if |

`resDeviance` |
residual deviance. |

`df` |
degrees of freedom. |

`pvalue` |
numerical vector of p-values based on the Wald test. Only provided if |

`stdError` |
Numerical vector with the standard errors for the parameter estimates based on the inverse of the observed information matrix. Only provided if |

`vcov` |
variance-covariance (inverse of the observed information matrix). Only provided if bootstrap = FALSE. |

`contribution` |
for |

`bootsRep` |
matrix with the bootstrap replicates. |

`bootstrap` |
logical. Was bootstrap CI requested? |

`fitted.values` |
the fitted mean values, obtained by transforming the linear predictor by the inverse of the link function. |

`residuals` |
difference between the response variable and the fitted values. |

`call` |
the matched call. |

Renata T C Yokota. This function is based on the R code developed by Caspar W N Looman and Wilma J Nusselder for non R-users, with modifications. Original R code is available upon request to Wilma J Nusselder (w.nusselder@erasmusmc.nl).

Nusselder, W.J., Looman, C.W.N. (2004). Decomposition of differences in health expectancy by cause. Demography, 41(2), 315-334.

Nusselder, W.J., Looman, C.W.N. (2010). WP7: Decomposition tools: technical report on attribution tool. European Health Expectancy Monitoring Unit (EHEMU). Available at <http://www.eurohex.eu/pdf/Reports_2010/2010TR7.2_TR%20on%20attribution%20tool.pdf>.

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 | ```
data(disabData)
## Model without bootstrap percentile confidence intervals and no attribution
fit1 <- BinAddHaz(dis.bin ~ diab + arth + stro , data = disabData, weights = wgt)
summary(fit1)
## Model with bootstrap percentile confidence intervals and attribution without
## stratification, no parallel calculation
# Warning message due to the low number of bootstrap replicates
## Not run:
fit2 <- BinAddHaz(dis.bin ~ diab + arth + stro , data = disabData, weights = wgt,
attrib = TRUE, type.attrib = "both", set.seed = TRUE, seed = 111,
bootstrap = TRUE, nbootstrap = 5)
summary(fit2)
## Model with bootstrap percentile confidence intervals with attribution based on
## the age variable and parallel calculation of bootstrap CI
# Warning message due to the low number of bootstrap replicates
diseases <- as.matrix(disabData[,c("diab", "arth", "stro")])
fit3 <- BinAddHaz(dis.bin ~ factor(age) -1 + diseases:factor(age), data = disabData,
weights = wgt, attrib.var = age, attrib = TRUE, type.attrib = "both",
set.seed = TRUE, seed = 111, bootstrap = TRUE, nbootstrap = 10,
parallel = TRUE, type.parallel = "snow", ncpus = 4)
summary(fit3)
## End(Not run)
``` |

addhaz documentation built on May 30, 2017, 6:20 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.