Call:
glm(formula = bus ~ uni + ind + twn + cna, family = binomial,
data = tscs2024)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.14291 0.16183 -13.242 <2e-16 ***
uni 0.23958 0.26704 0.897 0.370
ind -0.05351 0.20458 -0.262 0.794
twn -0.10864 0.19860 -0.547 0.584
cna 0.17919 0.78806 0.227 0.820
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 994.96 on 1530 degrees of freedom
Residual deviance: 992.80 on 1526 degrees of freedom
(32 observations deleted due to missingness)
AIC: 1002.8
Number of Fisher Scoring iterations: 5
mod3 <-update(mod1, .~. + blue + green) summary(mod3)
Call:
glm(formula = bus ~ uni + ind + twn + cna + blue + green, family = binomial,
data = tscs2024)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.97266 0.35332 -5.583 2.36e-08 ***
uni 0.06985 0.36508 0.191 0.848
ind 0.05938 0.31465 0.189 0.850
twn -0.09284 0.30332 -0.306 0.760
cna 0.63327 0.84418 0.750 0.453
blue 0.02557 0.36247 0.071 0.944
green -0.56192 0.37552 -1.496 0.135
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 505.20 on 791 degrees of freedom
Residual deviance: 497.67 on 785 degrees of freedom
(771 observations deleted due to missingness)
AIC: 511.67
Number of Fisher Scoring iterations: 5
Warning: Could not recover model data from environment. Please make sure your
data is available in your workspace.
Trying to retrieve data from the model frame now.
Warning: Could not recover model data from environment. Please make sure your
data is available in your workspace.
Trying to retrieve data from the model frame now.
Warning: Could not recover model data from environment. Please make sure your
data is available in your workspace.
Trying to retrieve data from the model frame now.
Warning: Could not recover model data from environment. Please make sure your
data is available in your workspace.
Trying to retrieve data from the model frame now.
library(VGAM)
Warning: package 'VGAM' was built under R version 4.4.1
Loading required package: stats4
Loading required package: splines
modvglm <-vglm(good ~ uni + ind+twn+ cna+blue+green , family=multinomial, data=tscs2024)summary(modvglm)
Call:
vglm(formula = good ~ uni + ind + twn + cna + blue + green, family = multinomial,
data = tscs2024)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept):1 1.5469 0.3645 4.244 2.20e-05 ***
(Intercept):2 1.8704 0.3421 5.468 4.55e-08 ***
uni:1 0.8600 0.3620 2.376 0.017513 *
uni:2 0.1104 0.3754 0.294 0.768581
ind:1 0.1085 0.2601 0.417 0.676454
ind:2 0.2124 0.1999 1.063 0.287883
twn:1 -1.5153 0.2770 -5.470 4.49e-08 ***
twn:2 -1.0051 0.2636 -3.814 0.000137 ***
cna:1 -0.1177 1.1214 -0.105 0.916376
cna:2 -0.5184 1.2571 -0.412 0.680050
blue:1 -0.3021 0.3579 -0.844 0.398685
blue:2 -0.7676 0.3306 -2.322 0.020229 *
green:1 -1.5148 0.3516 -4.308 1.65e-05 ***
green:2 -1.2720 0.3014 -4.220 2.44e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Names of linear predictors: log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
Residual deviance: 1545.934 on 1566 degrees of freedom
Log-likelihood: -772.9669 on 1566 degrees of freedom
Number of Fisher scoring iterations: 5
No Hauck-Donner effect found in any of the estimates
Reference group is level 3 of the response