gnm (version 1.1-1)

friend: Occupation of Respondents and Their Closest Friend

Description

Cross-classification of the occupation of respondent and that of their closest friend. Data taken from wave 10 (year 2000) of the British Household Panel Survey.

Usage

friend

Arguments

Format

A table of counts, with classifying factors r (respondent's occupational category; levels 1:31) and c (friend's occupational category; levels 1:31).

Examples

Run this code
# NOT RUN {
set.seed(1)

###  Fit an association model with homogeneous row-column effects
rc1 <- gnm(Freq ~ r + c + Diag(r,c) + MultHomog(r, c),
           family = poisson, data = friend)
rc1

# }
# NOT RUN {
###  Extend to two-component interaction
rc2 <- update(rc1, . ~ . + MultHomog(r, c, inst = 2),
              etastart = rc1$predictors)
rc2
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace