electors mclogit 0.8.6.2

# Class, Party Position, and Electoral Choice¶

## Description¶

This is an artificial data set on electoral choice as influenced by class and party positions.

## Usage¶

```data(electors)
```

## Examples¶

```data(electors)
summary(mclogit(
cbind(Freq,interaction(time,class))~econ.left+welfare+auth,
data=electors))
```
```Iteration 1 - Deviance = 85051.49
Iteration 2 - Deviance = 76759.94
Iteration 3 - Deviance = 74896.56
Iteration 4 - Deviance = 74890.9
Iteration 5 - Deviance = 74890.9
converged

Call:
mclogit(formula = cbind(Freq, interaction(time, class)) ~ econ.left +
welfare + auth, data = electors)

Estimate Std. Error z value Pr(>|z|)
econ.left -0.507265   0.007495 -67.679  < 2e-16 ***
welfare    0.564650   0.010700  52.769  < 2e-16 ***
auth       0.030305   0.005749   5.271 1.36e-07 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Null Deviance:     80580
Residual Deviance: 74890
Number of Fisher Scoring iterations:  5
Number of observations:  37500
```
```summary(mclogit(
cbind(Freq,interaction(time,class))~econ.left/class+welfare/class+auth/class,
data=electors))
```
```Iteration 1 - Deviance = 7377.939
Iteration 2 - Deviance = 4589.544
Iteration 3 - Deviance = 4293.485
Iteration 4 - Deviance = 4277.887
Iteration 5 - Deviance = 4277.808
Iteration 6 - Deviance = 4277.808
converged

Call:
mclogit(formula = cbind(Freq, interaction(time, class)) ~ econ.left/class +
welfare/class + auth/class, data = electors)

Estimate Std. Error z value Pr(>|z|)
econ.left                 -0.77851    0.02312 -33.671  < 2e-16 ***
welfare                    3.43776    0.03170 108.431  < 2e-16 ***
auth                      -0.13740    0.03608  -3.808  0.00014 ***
econ.left:classnew.middle  0.44546    0.02588  17.212  < 2e-16 ***
econ.left:classold.middle -0.44082    0.10387  -4.244  2.2e-05 ***
classnew.middle:welfare   -3.12917    0.03696 -84.659  < 2e-16 ***
classold.middle:welfare   -5.27438    0.07286 -72.393  < 2e-16 ***
classnew.middle:auth      -0.86676    0.03947 -21.957  < 2e-16 ***
classold.middle:auth       1.39435    0.05615  24.831  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Null Deviance:     80580
Residual Deviance: 4278
Number of Fisher Scoring iterations:  6
Number of observations:  37500
```
```summary(mclogit(
cbind(Freq,interaction(time,class))~econ.left/class+welfare/class+auth/class,
random=~1|party.time,
data=within(electors,party.time<-interaction(party,time))))
```
```Iteration 1 - deviance = 1054.511 - criterion = 0.1598497
Iteration 2 - deviance = 923.1626 - criterion = 0.02666473
Iteration 3 - deviance = 890.3113 - criterion = 0.006530011
Iteration 4 - deviance = 883.0567 - criterion = 0.0005723444
Iteration 5 - deviance = 881.4344 - criterion = 1.387329e-05
Iteration 6 - deviance = 881.2041 - criterion = 1.394381e-07
Iteration 7 - deviance = 881.1809 - criterion = 1.04388e-09
converged

Call:
mclogit(formula = cbind(Freq, interaction(time, class)) ~ econ.left/class +
welfare/class + auth/class, data = within(electors, party.time <-
interaction(party,
time)), random = ~1 | party.time)

Coefficents:
Estimate Std. Error z value Pr(>|z|)
econ.left                 -0.12603    0.18576  -0.678    0.497
welfare                    2.01955    0.29136   6.932 4.16e-12 ***
auth                       0.11409    0.15908   0.717    0.473
econ.left:classnew.middle -1.81703    0.09859 -18.430  < 2e-16 ***
econ.left:classold.middle -3.13862    0.15780 -19.890  < 2e-16 ***
classnew.middle:welfare   -0.89578    0.06573 -13.628  < 2e-16 ***
classold.middle:welfare   -1.47904    0.13451 -10.996  < 2e-16 ***
classnew.middle:auth      -1.43391    0.04855 -29.535  < 2e-16 ***
classold.middle:auth       1.44109    0.05883  24.494  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Co-)Variances:
Grouping level: 1
Estimate   Std.Err.
(Intercept) 3.066      0.9423

Null Deviance:     80580
Residual Deviance: 881.2
Number of Fisher Scoring iterations:  7
Number of observations:  37500
```
```## Do not test:
summary(mclogit(
cbind(Freq,interaction(time,class))~econ.left/(class*time)+welfare/class+auth/class,
random=~1|party.time,
data=within(electors,{
party.time <-interaction(party,time)
econ.left.sq <- (econ.left-mean(econ.left))^2
})))
```
```Iteration 1 - deviance = 1055.013 - criterion = 0.1599458
Iteration 2 - deviance = 923.0042 - criterion = 0.02667377
Iteration 3 - deviance = 890.0156 - criterion = 0.006569445
Iteration 4 - deviance = 882.7442 - criterion = 0.0005787939
Iteration 5 - deviance = 881.116 - criterion = 1.407264e-05
Iteration 6 - deviance = 880.8845 - criterion = 1.415608e-07
Iteration 7 - deviance = 880.8611 - criterion = 1.059383e-09
converged

Call:
mclogit(formula = cbind(Freq, interaction(time, class)) ~ econ.left/(class *
time) + welfare/class + auth/class, data = within(electors,
{
party.time <- interaction(party, time)
econ.left.sq <- (econ.left - mean(econ.left))^2
}), random = ~1 | party.time)

Coefficents:
Estimate Std. Error z value Pr(>|z|)
econ.left                      -0.08426    0.28175  -0.299    0.765
welfare                         2.01978    0.29137   6.932 4.15e-12 ***
auth                            0.11424    0.15909   0.718    0.473
econ.left:classnew.middle      -1.84956    0.12678 -14.588  < 2e-16 ***
econ.left:classold.middle      -3.21621    0.21256 -15.131  < 2e-16 ***
econ.left:time                 -0.08023    0.40734  -0.197    0.844
classnew.middle:welfare        -0.89582    0.06573 -13.628  < 2e-16 ***
classold.middle:welfare        -1.47946    0.13451 -10.999  < 2e-16 ***
classnew.middle:auth           -1.43387    0.04855 -29.533  < 2e-16 ***
classold.middle:auth            1.44101    0.05883  24.495  < 2e-16 ***
econ.left:classnew.middle:time  0.06208    0.15046   0.413    0.680
econ.left:classold.middle:time  0.14858    0.26950   0.551    0.581
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Co-)Variances:
Grouping level: 1
Estimate   Std.Err.
(Intercept) 3.066      0.9423

Null Deviance:     80580
Residual Deviance: 880.9
Number of Fisher Scoring iterations:  7
Number of observations:  37500
```
```## End(Do not test)
```