Learn R Programming

⚠️There's a newer version (0.11.6) of this package.Take me there.

R-package hopit: Hierarchical ordered probit models with application to reporting heterogeneity.

The hopit package provides R functions to fit and analyze ordered response data in the context of reporting heterogeneity.

Installation

  1. Make sure you have the most recent version of R

  2. Run the following code in your R console

    install.packages("hopit") 

Updating to the latest version of hopit package

You can track (and contribute to) the development of hopit at https://github.com/MaciejDanko/hopit. To install it:

  1. Install the release version of devtools from CRAN with install.packages("devtools").

  2. Make sure you have a working development environment.

    • Windows: Install Rtools.
    • Mac: Install Xcode from the Mac App Store.
    • Linux: Install a compiler and various development libraries (details vary across different flavors of Linux).
  3. To install the development version of hopit run:

    devtools::install_github("MaciejDanko/hopit")

Introduction

Get started with hopit by checking the vignette or run:

browseVignettes(package = "hopit") 

Contributing

This software is an academic project. Any issues and pull requests are welcome.

  • If hopit is malfunctioning, please report the case by submitting an issue on GitHub.

References

Jurges H (2007). “True health vs response styles: exploring cross-country differences in self-reported health.” Health Economics, 16(2), pp. 163-178. doi: 10.1002/hec.1134.

Oksuzyan A, Danko MJ, Caputo J, Jasilionis D and Shkolnikov VM (2019). “Is the story about sensitive women and stoical men true? Gender differences in health after adjustment for reporting behavior.” Social Science & Medicine, 228, pp. 41-50. doi: 10.1016/j.socscimed.2019.03.002.

Copy Link

Version

Install

install.packages('hopit')

Monthly Downloads

205

Version

0.9.0

License

GPL-3

Maintainer

Maciej J. Danko

Last Published

April 5th, 2019

Functions in hopit (0.9.0)

%notc%

Not %c% function
hopit.control

Auxiliary for controlling the fitting of a hopit model
getLevels

Summarize the adjusted and the original self-rated response levels
hopit_Latent

INTERNAL: Calculate the predicted continuous latent measure (h_i).
%c%

Check whether one set contains all elements of another set
anova.hopit

Likelihood Ratio Test Tables
hopit_Threshold

INTERNAL: Calculate the model cut-points (alpha)
latentIndex

Calculate the latent index
profile.hopit

Calculate the log likelihood profile for the fitted hopit model
boot_hopit

Bootstrapping hopit model
sigma.hopit

Extract the Sigma parameter from a hopit model
svy.varcoef_hopit

Calculation of the variance-covariance matrix for a specified survey design (experimental function)
hopit_derivLL

INTERNAL: The gradient of the log likelihood function
coef.hopit

Extracting the model coefficients
vcov.hopit

Variance-covariance matrix from the fitted model
get.hopit.start

INTERNAL: Get the starting parameters
logLik.hopit

Extracting a log likelihood of the fitted model
plot.profile.hopit

Plot the log likelihood profile for a profile.hopit object
print.lrt.hopit

healthsurvey

Artificially generated health survey data
hopit

Generalized hierarchical ordered threshold models.
standardizeCoef

Standardization of the coefficients
getCutPoints

Calculate the threshold cut-points and individual adjusted responses using Jurges' method
hopit_fitter

INTERNAL: Fit a hopit model given the starting parameters
summary.hopit

Calculate the model summary
print.profile.hopit

Print method for a profile.hopit object
hopit_negLL

INTERNAL: The log likelihood function
print.hopit

Printing basic information about fitted hopit model
lrt.hopit

Likelihood ratio test for a pair of models
percentile_CI

Calculating the confidence intervals of the bootstrapped function using the percentile method
%notin%

Not %in% function
AIC.hopit

Extracting the Akaike Information Criterion from the fitted model