knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of this package is to provide tools to fit time-varying coefficient models.
devtools::install_github("inqs909/tvcm")
You will need to install rtools to allow the devtools
package to install packages from a remote repository: https://cran.r-project.org/bin/windows/Rtools/.
Make sure to update R as well.
The main functions for this package are the tvcm
, binary_vcm
, and pois_vcm
functions. They are designed to be similar with other functions that fit models. Additionally, there are functions to compute the optimal bandwidth using a cross-validation approach.
The estimates are obtained using either a local least-squares or local likelihood approach. The varying-coefficients are approximated using a local-linear model.
The standard errors are obtained using a bootstrap method. Due the correlated nature of longitudinal data, bootstrap standard errors provide more accurate results. The functions will provide both the standard errors and point-wise percentiles for a value of a varying-coefficient functions.
The plot()
function will generate plots of the time-varying coefficient model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.