Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mcglm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leg
mcglm
Commits
87400f6d
Commit
87400f6d
authored
9 years ago
by
Walmes Marques Zeviani
Browse files
Options
Downloads
Patches
Plain Diff
Apply the 72 rule.
parent
a0b32cae
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
R/mcglm.R
+81
-44
81 additions, 44 deletions
R/mcglm.R
with
81 additions
and
44 deletions
R/mcglm.R
+
81
−
44
View file @
87400f6d
##' @title Multivariate covariance generalized linear models (McGLMs)
##'
##'
##' @description Fits a multivariate covariance generalized linear models (McGLMs) to data.
##' McGLM is a general framework for non-normal multivariate data analysis, designed to handle
##' multivariate response variables, along with a wide range of temporal and spatial correlation
##' structures defined in terms of a covariance link function combined with a matrix linear predictor
##' involving known matrices. The models take non-normality into account in the conventional way by means
##' of a variance function, and the mean structure is modelled by means of a link function and a linear predictor.
##' The models are fitted using an efficient Newton scoring algorithm based on quasi-likelihood and
##' Pearson estimating functions, using only second-moment assumptions.
##' This provides a unified approach to a wide variety of different types of response variables and
##' covariance structures, including multivariate extensions of repeated measures, time series, longitudinal,
##' spatial and spatio-temporal structures.
##'
##' @description Fits a multivariate covariance generalized linear
##' models (McGLMs) to data. McGLM is a general framework for
##' non-normal multivariate data analysis, designed to handle
##' multivariate response variables, along with a wide range of
##' temporal and spatial correlation structures defined in terms of
##' a covariance link function combined with a matrix linear
##' predictor involving known matrices. The models take
##' non-normality into account in the conventional way by means of a
##' variance function, and the mean structure is modelled by means
##' of a link function and a linear predictor. The models are
##' fitted using an efficient Newton scoring algorithm based on
##' quasi-likelihood and Pearson estimating functions, using only
##' second-moment assumptions. This provides a unified approach to
##' a wide variety of different types of response variables and
##' covariance structures, including multivariate extensions of
##' repeated measures, time series, longitudinal, spatial and
##' spatio-temporal structures.
##'
##' @docType package
##' @name mcglm
NULL
#' @name ahs
#'
#' @title Australian health survey
#' @name ahs
#'
#' @description The Australian health survey was used by Bonat and Jorgensen (2015) as an example of multivariate
#' count regression model. The data consists of five count response variables concerning health system access
#' measures and nine covariates concerning social conditions in Australian for 1987-88.
#' @description The Australian health survey was used by Bonat and
#' Jorgensen (2015) as an example of multivariate count regression
#' model. The data consists of five count response variables
#' concerning health system access measures and nine covariates
#' concerning social conditions in Australian for 1987-88.
#'
#' \itemize{
#'
#' \item \code{sex} - Factor, two levels (0-Male; 1-Female).
#'
#' \item \code{age} - Respondent's age in years divided by 100.
#' \item \code{income} - Respondent's annual income in Australian dollars divided by 1000.
#' \item \code{levyplus} - Factor, two levels (1- if respondent is covered by private health
#' insurance fund for private patients in public hospital (with doctor of choice); 0 - otherwise).
#' \item \code{freepoor} - Factor, two levels (1 - if respondent is covered by government because low income,
#' recent immigrant, unemployed; 0 - otherwise).
#' \item \code{freerepa} - Factor, two levels (1 - if respondent is covered free by government because of
#' old-age or disability pension, or because invalid veteran or family of deceased veteran; 0 - otherwise).
#' \item \code{illnes} - Number of illnesses in past 2 weeks, with 5 or more weeks coded as 5.
#' \item \code{actdays} - Number of days of reduced activity in the past two weeks due to illness or injury.
#' \item \code{hscore} - Respondent's general health questionnaire score using Goldberg's method;
#' high score indicates poor health.
#' \item \code{chcond1} - Factor, two levels (1 - if respondent has chronic condition(s) but is not limited
#' in activity; 0 - otherwise).
#' \item \code{chcond2} - Factor, two levels (1 if respondent has chronic condition(s) and is limited in
#' activity; 0 - otherwise).
#' \item \code{Ndoc} - Number of consultations with a doctor or specialist (response variable).
#' \item \code{Nndoc} - Number of consultations with health professionals (response variable).
#' \item \code{Nadm} - Number of admissions to a hospital, psychiatric hospital, nursing or
#' convalescence home in the past 12 months (response variable).
#' \item \code{Nhosp} - Number of nights in a hospital during the most recent admission.
#' \item \code{Nmed} - Total number of prescribed and non prescribed medications used in the past two days.
#'
#' \item \code{income} - Respondent's annual income in Australian
#' dollars divided by 1000.
#'
#' \item \code{levyplus} - Factor, two levels (1- if respondent is
#' covered by private health insurance fund for private patients in
#' public hospital (with doctor of choice); 0 - otherwise).
#'
#' \item \code{freepoor} - Factor, two levels (1 - if respondent is
#' covered by government because low income, recent immigrant,
#' unemployed; 0 - otherwise).
#'
#' \item \code{freerepa} - Factor, two levels (1 - if respondent is
#' covered free by government because of old-age or disability
#' pension, or because invalid veteran or family of deceased
#' veteran; 0 - otherwise).
#'
#' \item \code{illnes} - Number of illnesses in past 2 weeks, with 5 or
#' more weeks coded as 5.
#'
#' \item \code{actdays} - Number of days of reduced activity in the past
#' two weeks due to illness or injury.
#'
#' \item \code{hscore} - Respondent's general health questionnaire score
#' using Goldberg's method; high score indicates poor health.
#'
#' \item \code{chcond1} - Factor, two levels (1 - if respondent has
#' chronic condition(s) but is not limited in activity; 0 -
#' otherwise).
#'
#' \item \code{chcond2} - Factor, two levels (1 if respondent has
#' chronic condition(s) and is limited in activity; 0 - otherwise).
#'
#' \item \code{Ndoc} - Number of consultations with a doctor or
#' specialist (response variable).
#'
#' \item \code{Nndoc} - Number of consultations with health
#' professionals (response variable).
#'
#' \item \code{Nadm} - Number of admissions to a hospital, psychiatric
#' hospital, nursing or convalescence home in the past 12 months
#' (response variable).
#'
#' \item \code{Nhosp} - Number of nights in a hospital during the most
#' recent admission.
#'
#' \item \code{Nmed} - Total number of prescribed and non prescribed
#' medications used in the past two days.
#'
#' \item \code{id} - Respondent's index.
#'
#' }
#'
#' @docType data
...
...
@@ -61,7 +97,8 @@ NULL
#'
#' @format a \code{data.frame} with 5190 records and 17 variables.
#'
#' @source Deb, P. and Trivedi, P. K. (1997). Demand for medical care by the elderly: A finite mixture approach,
#' Journal of Applied Econometrics 12(3):313--336.
#' @source Deb, P. and Trivedi, P. K. (1997). Demand for medical care by
#' the elderly: A finite mixture approach, Journal of Applied
#' Econometrics 12(3):313--336.
#'
NULL
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment