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)
##' @title Multivariate covariance generalized linear models (McGLMs)
##'
##'
##'
##' @description Fits a multivariate covariance generalized linear
##' @description Fits a multivariate covariance generalized linear models (McGLMs) to data.
##' models (McGLMs) to data. McGLM is a general framework for
##' McGLM is a general framework for non-normal multivariate data analysis, designed to handle
##' non-normal multivariate data analysis, designed to handle
##' multivariate response variables, along with a wide range of temporal and spatial correlation
##' multivariate response variables, along with a wide range of
##' structures defined in terms of a covariance link function combined with a matrix linear predictor
##' temporal and spatial correlation structures defined in terms of
##' involving known matrices. The models take non-normality into account in the conventional way by means
##' a covariance link function combined with a matrix linear
##' of a variance function, and the mean structure is modelled by means of a link function and a linear predictor.
##' predictor involving known matrices. The models take
##' The models are fitted using an efficient Newton scoring algorithm based on quasi-likelihood and
##' non-normality into account in the conventional way by means of a
##' Pearson estimating functions, using only second-moment assumptions.
##' variance function, and the mean structure is modelled by means
##' This provides a unified approach to a wide variety of different types of response variables and
##' of a link function and a linear predictor. The models are
##' covariance structures, including multivariate extensions of repeated measures, time series, longitudinal,
##' fitted using an efficient Newton scoring algorithm based on
##' spatial and spatio-temporal structures.
##' 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
##' @docType package
##' @name mcglm
##' @name mcglm
NULL
NULL
#' @name ahs
#'
#' @title Australian health survey
#' @title Australian health survey
#' @name ahs
#'
#'
#' @description The Australian health survey was used by Bonat and Jorgensen (2015) as an example of multivariate
#' @description The Australian health survey was used by Bonat and
#' count regression model. The data consists of five count response variables concerning health system access
#' Jorgensen (2015) as an example of multivariate count regression
#' measures and nine covariates concerning social conditions in Australian for 1987-88.
#' 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{
#' \itemize{
#'
#' \item \code{sex} - Factor, two levels (0-Male; 1-Female).
#' \item \code{sex} - Factor, two levels (0-Male; 1-Female).
#'
#' \item \code{age} - Respondent's age in years divided by 100.
#' \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
#' \item \code{income} - Respondent's annual income in Australian
#' insurance fund for private patients in public hospital (with doctor of choice); 0 - otherwise).
#' dollars divided by 1000.
#' \item \code{freepoor} - Factor, two levels (1 - if respondent is covered by government because low income,
#'
#' recent immigrant, unemployed; 0 - otherwise).
#' \item \code{levyplus} - Factor, two levels (1- if respondent is
#' \item \code{freerepa} - Factor, two levels (1 - if respondent is covered free by government because of
#' covered by private health insurance fund for private patients in
#' old-age or disability pension, or because invalid veteran or family of deceased veteran; 0 - otherwise).
#' public hospital (with doctor of choice); 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{freepoor} - Factor, two levels (1 - if respondent is
#' \item \code{hscore} - Respondent's general health questionnaire score using Goldberg's method;
#' covered by government because low income, recent immigrant,
#' high score indicates poor health.
#' unemployed; 0 - otherwise).
#' \item \code{chcond1} - Factor, two levels (1 - if respondent has chronic condition(s) but is not limited
#'
#' in activity; 0 - otherwise).
#' \item \code{freerepa} - Factor, two levels (1 - if respondent is
#' \item \code{chcond2} - Factor, two levels (1 if respondent has chronic condition(s) and is limited in
#' covered free by government because of old-age or disability
#' activity; 0 - otherwise).
#' pension, or because invalid veteran or family of deceased
#' \item \code{Ndoc} - Number of consultations with a doctor or specialist (response variable).
#' veteran; 0 - otherwise).
#' \item \code{Nndoc} - Number of consultations with health professionals (response variable).
#'
#' \item \code{Nadm} - Number of admissions to a hospital, psychiatric hospital, nursing or
#' \item \code{illnes} - Number of illnesses in past 2 weeks, with 5 or
#' convalescence home in the past 12 months (response variable).
#' more weeks coded as 5.
#' \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{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.
#' \item \code{id} - Respondent's index.
#'
#' }
#' }
#'
#'
#' @docType data
#' @docType data
...
@@ -61,7 +97,8 @@ NULL
...
@@ -61,7 +97,8 @@ NULL
#'
#'
#' @format a \code{data.frame} with 5190 records and 17 variables.
#' @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,
#' @source Deb, P. and Trivedi, P. K. (1997). Demand for medical care by
#' Journal of Applied Econometrics 12(3):313--336.
#' the elderly: A finite mixture approach, Journal of Applied
#' Econometrics 12(3):313--336.
#'
#'
NULL
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