A Handbook of Statistical Analyses Using R (3rd Edition)

Vignettes

- An Introduction to R
- Chapter Analysis of Variance
- Chapter Analyzing Longitudinal Data I
- Chapter Analyzing Longitudinal Data II
- Chapter Bayesian Inference
- Chapter Cluster Analysis
- Chapter Conditional Inference
- Chapter Data Analysis using Graphical Displays
- Chapter Density Estimation
- Chapter Generalized Additive Models
- Chapter Logistic Regression and Generalized Linear Models
- Chapter Meta-Analysis
- Chapter Missing Values
- Chapter Multidimensional Scaling
- Chapter Principal Component Analysis
- Chapter Quantile Regression
- Chapter Recursive Partitioning
- Chapter Simple Inference
- Chapter Simultaneous Inference and Multiple Comparisons
- Chapter Survival Analysis
- Errata
- Multiple Linear Regression

60

**BtheB:**Beat the Blues Data**CYGOB1:**CYG OB1 Star Cluster Data**Forbes2000:**The Forbes 2000 Ranking of the World's Biggest Companies...**gardenflowers:**Garden Flowers Data**household:**Household Expenditure Data**schizophrenia2:**Schizophrenia Data**USairpollution:**Air Pollution in US Cities**Browse all...**

Popular Man pages

Description Usage Format Details Source Examples

Data from an psychiatric screening questionnaire

1 | ```
data("GHQ")
``` |

A data frame with 22 observations on the following 4 variables.

`GHQ`

the General Health Questionnaire score.

`gender`

a factor with levels

`female`

and`male`

`cases`

the number of diseased subjects.

`non.cases`

the number of healthy subjects.

The data arise from a study of a psychiatric screening questionnaire called the GHQ (General Health Questionnaire, see Goldberg, 1972). Here the main question of interest is to see how caseness is related to gender and GHQ score.

D. Goldberg (1972). *The Detection of Psychiatric Illness by Questionnaire*,
Oxford University Press, Oxford, UK.

1 2 3 4 5 6 | ```
data("GHQ", package = "HSAUR3")
male <- subset(GHQ, gender == "male")
female <- subset(GHQ, gender == "female")
layout(matrix(1:2, ncol = 2))
barplot(t(as.matrix(male[,c("cases", "non.cases")])), main = "Male", xlab = "GHC score")
barplot(t(as.matrix(male[,c("cases", "non.cases")])), main = "Female", xlab = "GHC score")
``` |

What can we improve?

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.

Close