Title: | Effect Stars |
---|---|
Description: | Provides functions for the method of effect stars as proposed by Tutz and Schauberger (2013) <doi:10.1080/10618600.2012.701379>. Effect stars can be used to visualize estimates of parameters corresponding to different groups, for example in multinomial logit models. Beside the main function 'effectstars' there exist methods for special objects, for example for 'vglm' objects from the 'VGAM' package. |
Authors: | Gunther Schauberger |
Maintainer: | Gunther Schauberger <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1-3 |
Built: | 2024-11-08 02:56:13 UTC |
Source: | https://github.com/cran/EffectStars2 |
The package provides functions for the method of effect stars as proposed by
Tutz and Schauberger (2013). Beside the main function
effectstars
there exist methods for special objects, for
example for vglm
-objects.
Gunther Schauberger
[email protected]
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, G. and Schauberger, G. (2013): Visualization of Categorical Response Models - from Data Glyphs to Parameter Glyphs, Journal of Computational and Graphical Statistics, 22(1), 156–177
effectstars
, star.ctrl
,
effectstars.vglm
, effectstars.DIFlasso
,
effectstars.DIFboost
Plots effect stars for grouped coefficients. Effect stars are applicable if the
parameters of a model are grouped in some sense. For example, the parameters of a multinomial
logit models are grouped by the covariates, i.e. per covariate there is one estimate per response category.
But also in many other models, the parameters can have a fixed grouping structure. All estimates have to be positive,
typically the exponentials of the estimates are plotted. Every effect star comes with a circle of radius 1.
This circle represents the case of no effect, i.e. exp(0)=1
.
## Default S3 method: effectstars(x, names = NULL, subs = NULL, labels = NULL, control = star.ctrl(), cols = NULL, fixed = FALSE, scale = 1, ...)
## Default S3 method: effectstars(x, names = NULL, subs = NULL, labels = NULL, control = star.ctrl(), cols = NULL, fixed = FALSE, scale = 1, ...)
x |
A matrix containing all coefficients to plot, one column per group/covariate,
one row per category. If the arguments |
names |
A vector containing all group/covariate names, will be used as titles of single
effect stars. If NULL, |
subs |
A vector containing all subtitles, one per group/covariate. |
labels |
A vector or a matrix containing labels of the categories. If labels is a matrix,
it needs to have the same dimensions as |
control |
Control argument (to set graphical parameters) for method |
cols |
Number of columns for arranging effect stars |
fixed |
If |
scale |
Global factor to increase ( |
... |
possible further arguments |
Gunther Schauberger
[email protected]
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, G. and Schauberger, G. (2013): Visualization of Categorical Response Models -
from Data Glyphs to Parameter Glyphs, Journal of Computational and Graphical Statistics 22(1), 156–177.
Gerhard Tutz (2012): Regression for Categorical Data, Cambridge University Press
star.ctrl
, effectstars.vglm
, effectstars.DIFlasso
, effectstars.DIFboost
## Not run: ##################### ### Simple example for basic effectstars function p <- 4; k <- 5 coefs <- matrix(exp(rnorm(p*k,sd=0.5)),ncol=k) rownames(coefs) <- paste("Variable",1:p) colnames(coefs) <- paste("Cat",1:k) effectstars(coefs) ##################### ### Example for effect stars for a multivariate logit model data(xs.nz, package = "VGAMdata") xs.nz$age <- scale(xs.nz$age) library(VGAM) cats_dogs <- vglm(cbind(cat, dog) ~ age + sex + marital, data = xs.nz, family = binom2.or(zero = NULL)) summary(cats_dogs) ## quick and dirty effectstars(exp(coef(cats_dogs, matrix = TRUE))) ## make it pretty # create the effects matrix you want to plot, name rows and columns effects <- exp(coef(cats_dogs, matrix = TRUE)) colnames(effects) <- c("cat", "dog", "OR") rownames(effects) <- c("Intercept", "Age", "Gender", rep("Marital", 3)) # create subtitles containing category labels of predictors subs <- c(rep("",2), "(male)", "(married)", "(separated/divorced)", "(widowed)") # create labels containing the response categories and all p-values p_values <- formatC(summary(cats_dogs)@coef3[,4], format="f", digits=3) labels <- matrix(paste0(rep(c("cat", "dog", "OR"), nrow(effects)), "\n(", p_values, ")"), byrow = TRUE, ncol = 3) # plot effectstars effectstars(effects, labels = labels, subs = subs) ##################### ## Example for method effectstars.vglm for a multinomial logit model calculated in VGAM data(election) library(VGAM) m_elect <- vglm(Partychoice ~ Gender + West + Age + Union + Highschool + Unemployment + Pol.Interest + Democracy + Religion, family = multinomial(), data = election) effectstars(m_elect) ## End(Not run)
## Not run: ##################### ### Simple example for basic effectstars function p <- 4; k <- 5 coefs <- matrix(exp(rnorm(p*k,sd=0.5)),ncol=k) rownames(coefs) <- paste("Variable",1:p) colnames(coefs) <- paste("Cat",1:k) effectstars(coefs) ##################### ### Example for effect stars for a multivariate logit model data(xs.nz, package = "VGAMdata") xs.nz$age <- scale(xs.nz$age) library(VGAM) cats_dogs <- vglm(cbind(cat, dog) ~ age + sex + marital, data = xs.nz, family = binom2.or(zero = NULL)) summary(cats_dogs) ## quick and dirty effectstars(exp(coef(cats_dogs, matrix = TRUE))) ## make it pretty # create the effects matrix you want to plot, name rows and columns effects <- exp(coef(cats_dogs, matrix = TRUE)) colnames(effects) <- c("cat", "dog", "OR") rownames(effects) <- c("Intercept", "Age", "Gender", rep("Marital", 3)) # create subtitles containing category labels of predictors subs <- c(rep("",2), "(male)", "(married)", "(separated/divorced)", "(widowed)") # create labels containing the response categories and all p-values p_values <- formatC(summary(cats_dogs)@coef3[,4], format="f", digits=3) labels <- matrix(paste0(rep(c("cat", "dog", "OR"), nrow(effects)), "\n(", p_values, ")"), byrow = TRUE, ncol = 3) # plot effectstars effectstars(effects, labels = labels, subs = subs) ##################### ## Example for method effectstars.vglm for a multinomial logit model calculated in VGAM data(election) library(VGAM) m_elect <- vglm(Partychoice ~ Gender + West + Age + Union + Highschool + Unemployment + Pol.Interest + Democracy + Religion, family = multinomial(), data = election) effectstars(m_elect) ## End(Not run)
Plots effect stars for DIFboost
-objects. The parameter estimates
for DIF-items are plotted, grouped by items.
For more details on plotting effect stars see effectstars
.
## S3 method for class 'DIFboost' effectstars(x, only.DIFitems = TRUE, ...)
## S3 method for class 'DIFboost' effectstars(x, only.DIFitems = TRUE, ...)
x |
A |
only.DIFitems |
If |
... |
further arguments for generic function |
Gunther Schauberger
[email protected]
https://www.sg.tum.de/epidemiologie/team/schauberger/
Schauberger, G. and Tutz, G. (2016): Detection of Differential Item Functioning in Rasch Models by Boosting Techniques,
British Journal of Mathematical and Statistical Psychology, 69(1), 80 - 103
Tutz, G. and Schauberger, G. (2013): Visualization of Categorical Response Models -
from Data Glyphs to Parameter Glyphs, Journal of Computational and Graphical Statistics 22(1), 156–177.
Gerhard Tutz (2012): Regression for Categorical Data, Cambridge University Press
## Not run: ### example for DIFboost library(DIFboost) data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFboost(Y = Y, X = X) effectstars(m1) ## End(Not run)
## Not run: ### example for DIFboost library(DIFboost) data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFboost(Y = Y, X = X) effectstars(m1) ## End(Not run)
Plots effect stars for DIFlasso
-objects. The parameter estimates
for DIF-items are plotted, grouped by items.
For more details on plotting effect stars see effectstars
.
## S3 method for class 'DIFlasso' effectstars(x, only.DIFitems = TRUE, ...)
## S3 method for class 'DIFlasso' effectstars(x, only.DIFitems = TRUE, ...)
x |
A |
only.DIFitems |
If |
... |
further arguments for generic function |
Gunther Schauberger
[email protected]
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, G. and Schauberger, G. (2015): A Penalty Approach to Differential Item Functioning in Rasch Models,
, Psychometrika, 80(1), 21 – 43
Tutz, G. and Schauberger, G. (2013): Visualization of Categorical Response Models -
from Data Glyphs to Parameter Glyphs, Journal of Computational and Graphical Statistics 22(1), 156–177.
Gerhard Tutz (2012): Regression for Categorical Data, Cambridge University Press
## Not run: ### example for DIFlasso library(DIFlasso) data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) effectstars(m1) ## End(Not run)
## Not run: ### example for DIFlasso library(DIFlasso) data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) effectstars(m1) ## End(Not run)
Plots effect stars for vglm
-objects. In particular, the method
works for multinomial logit models created by family multinomial
and for
models with ordinal response like sratio
, cratio
,
cumulative
or acat
.
For more details on plotting effect stars see effectstars
.
## S3 method for class 'vglm' effectstars(x, p.values = FALSE, symmetric = TRUE, plot.parallel = FALSE, ...)
## S3 method for class 'vglm' effectstars(x, p.values = FALSE, symmetric = TRUE, plot.parallel = FALSE, ...)
x |
A |
p.values |
Should the p-values of the single coefficients be included in the labels? Default
is |
symmetric |
Should the parameters be transformed to parameters with symmetric (sum-to-zero)
side constraints instead of using reference levels. Default is |
plot.parallel |
Should parallel parameters (equal over all response categories) be
represented by effect stars. Default is |
... |
further arguments for generic function |
Gunther Schauberger
[email protected]
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, G. and Schauberger, G. (2013): Visualization of Categorical Response Models -
from Data Glyphs to Parameter Glyphs, Journal of Computational and Graphical Statistics 22(1), 156–177.
Gerhard Tutz (2012): Regression for Categorical Data, Cambridge University Press
effectstars
effectstars.DIFlasso
## Not run: ############################################ ### Examples for multinomial logit model ############################################ ### German election data data(election) library(VGAM) m_elect <- vglm(Partychoice ~ Gender + West + Age + Union + Highschool + Unemployment + Pol.Interest + Democracy + Religion, family = multinomial(), data = election) effectstars(m_elect) # include p.values effectstars(m_elect, p.values = TRUE) ### German election data with category-specific covariates data(election) election[,13:16] <- election[,13:16] - election[,12] election[,18:21] <- election[,18:21] - election[,17] election[,23:26] <- election[,23:26] - election[,22] election[,28:31] <- election[,28:31] - election[,27] election$Social <- election$Social_SPD election$Immigration <- election$Immigration_SPD election$Nuclear <- election$Nuclear_SPD election$Left_Right <- election$Left_Right_SPD m.all <- vglm(Partychoice ~ Social + Immigration + Nuclear + Left_Right + Age + Religion + Democracy + Pol.Interest + Unemployment + Highschool + Union + West + Gender, data = election, family = multinomial(parallel = TRUE~-1 + Social + Immigration + Nuclear + Left_Right, refLevel = 1), xij = list(Social ~ Social_SPD + Social_FDP + Social_Greens + Social_Left, Immigration ~ Immigration_SPD + Immigration_FDP + Immigration_Greens + Immigration_Left, Nuclear ~ Nuclear_SPD + Nuclear_FDP + Nuclear_Greens + Nuclear_Left, Left_Right ~ Left_Right_SPD + Left_Right_FDP + Left_Right_Greens + Left_Right_Left), form2 = ~Social + Immigration + Nuclear + Left_Right + Age + Religion + Democracy + Pol.Interest + Unemployment + Highschool + Union + West + Gender + Social_SPD + Social_FDP + Social_Greens + Social_Left + Immigration_SPD + Immigration_FDP + Immigration_Greens + Immigration_Left + Nuclear_SPD + Nuclear_FDP + Nuclear_Greens + Nuclear_Left + Left_Right_SPD + Left_Right_FDP + Left_Right_Greens + Left_Right_Left ) effectstars(m.all, symmetric = FALSE, p.values = TRUE) summary(m.all) ### Chilean plebiscite data data(plebiscite) m_chile <- vglm(Vote ~ ., family = multinomial(), data = plebiscite) effectstars(m_chile) # choose fixed circle sizes and use reference category instead of symmetric side constraints effectstars(m_chile, symmetric = FALSE, fixed = TRUE) ############################################ ### Examples for ordinal data ############################################ ### Munich insolvency data data(insolvency) insolvency$Age <- scale(insolvency$Age) my_formula <- Insolvency ~ Age + Gender m_acat <- vglm(my_formula, data = insolvency,family = acat()) m_cratio <- vglm(my_formula, data = insolvency,family = cratio()) m_sratio <- vglm(my_formula, data = insolvency,family = sratio()) m_cumulative <- vglm(my_formula, data = insolvency,family = cumulative()) summary(m_acat) effectstars(m_acat, p.values = TRUE) summary(m_cratio) effectstars(m_cratio, p.values = TRUE) summary(m_sratio) effectstars(m_sratio, p.values = TRUE) summary(m_cumulative) effectstars(m_cumulative, p.values = TRUE) ## End(Not run)
## Not run: ############################################ ### Examples for multinomial logit model ############################################ ### German election data data(election) library(VGAM) m_elect <- vglm(Partychoice ~ Gender + West + Age + Union + Highschool + Unemployment + Pol.Interest + Democracy + Religion, family = multinomial(), data = election) effectstars(m_elect) # include p.values effectstars(m_elect, p.values = TRUE) ### German election data with category-specific covariates data(election) election[,13:16] <- election[,13:16] - election[,12] election[,18:21] <- election[,18:21] - election[,17] election[,23:26] <- election[,23:26] - election[,22] election[,28:31] <- election[,28:31] - election[,27] election$Social <- election$Social_SPD election$Immigration <- election$Immigration_SPD election$Nuclear <- election$Nuclear_SPD election$Left_Right <- election$Left_Right_SPD m.all <- vglm(Partychoice ~ Social + Immigration + Nuclear + Left_Right + Age + Religion + Democracy + Pol.Interest + Unemployment + Highschool + Union + West + Gender, data = election, family = multinomial(parallel = TRUE~-1 + Social + Immigration + Nuclear + Left_Right, refLevel = 1), xij = list(Social ~ Social_SPD + Social_FDP + Social_Greens + Social_Left, Immigration ~ Immigration_SPD + Immigration_FDP + Immigration_Greens + Immigration_Left, Nuclear ~ Nuclear_SPD + Nuclear_FDP + Nuclear_Greens + Nuclear_Left, Left_Right ~ Left_Right_SPD + Left_Right_FDP + Left_Right_Greens + Left_Right_Left), form2 = ~Social + Immigration + Nuclear + Left_Right + Age + Religion + Democracy + Pol.Interest + Unemployment + Highschool + Union + West + Gender + Social_SPD + Social_FDP + Social_Greens + Social_Left + Immigration_SPD + Immigration_FDP + Immigration_Greens + Immigration_Left + Nuclear_SPD + Nuclear_FDP + Nuclear_Greens + Nuclear_Left + Left_Right_SPD + Left_Right_FDP + Left_Right_Greens + Left_Right_Left ) effectstars(m.all, symmetric = FALSE, p.values = TRUE) summary(m.all) ### Chilean plebiscite data data(plebiscite) m_chile <- vglm(Vote ~ ., family = multinomial(), data = plebiscite) effectstars(m_chile) # choose fixed circle sizes and use reference category instead of symmetric side constraints effectstars(m_chile, symmetric = FALSE, fixed = TRUE) ############################################ ### Examples for ordinal data ############################################ ### Munich insolvency data data(insolvency) insolvency$Age <- scale(insolvency$Age) my_formula <- Insolvency ~ Age + Gender m_acat <- vglm(my_formula, data = insolvency,family = acat()) m_cratio <- vglm(my_formula, data = insolvency,family = cratio()) m_sratio <- vglm(my_formula, data = insolvency,family = sratio()) m_cumulative <- vglm(my_formula, data = insolvency,family = cumulative()) summary(m_acat) effectstars(m_acat, p.values = TRUE) summary(m_cratio) effectstars(m_cratio, p.values = TRUE) summary(m_sratio) effectstars(m_sratio, p.values = TRUE) summary(m_cumulative) effectstars(m_cumulative, p.values = TRUE) ## End(Not run)
The data set contains data from the German Longitudinal Election Study. The response categories refer to the five dominant parties in Germany. The explanatory variables refer to the declarations of single voters.
A data frame with 816 observations on the following 30 variables.
Standardized age of the voter
Unstandardized age of the voter
Party Choice with levels CDU
, SPD
,
FDP
, Greens
and Left Party
Gender with levels female
and male
Regional provenance (West-Germany or East-Germany) with
levels east
and west
Member of a Union
with levels no member
and member
Educational level with levels no highschool
and highschool
Unemployment with levels
not unemployed
and unemployed
Political Interest with levels very
interested
and less interested
Satisfaction with the functioning of democracy with
levels satisfied
and not satisfied
Religion with levels evangelical
,
catholic
and other religion
Difference in attitude towards the socioeconomic dimension of politics between respondent and CDU
Difference in attitude towards the socioeconomic dimension of politics between respondent and SPD
Difference in attitude towards the socioeconomic dimension of politics between respondent and FDP
Difference in attitude towards the socioeconomic dimension of politics between respondent and the Greens
Difference in attitude towards the socioeconomic dimension of politics between respondent and the Left party
Difference in attitude towards immigration of foreigners between respondent and CDU
Difference in attitude towards immigration of foreigners between respondent and SPD
Difference in attitude towards immigration of foreigners between respondent and FDP
Difference in attitude towards immigration of foreigners between respondent and the Greens
Difference in attitude towards immigration of foreigners between respondent and the Left party
Difference in attitude towards nuclear energy between respondent and CDU
Difference in attitude towards nuclear energy between respondent and SPD
Difference in attitude towards nuclear energy between respondent and FDP
Difference in attitude towards nuclear energy between respondent and the Greens
Difference in attitude towards nuclear energy between respondent and the Left party
Difference in attitude towards the positioning on a political left-right scale between respondent and CDU
Difference in attitude towards the positioning on a political left-right scale between respondent and SPD
Difference in attitude towards the positioning on a political left-right scale between respondent and FDP
Difference in attitude towards the positioning on a political left-right scale between respondent and the Greens
Difference in attitude towards the positioning on a political left-right scale between respondent and the Left party
German Longitudinal Election Study (GLES)
data(election) library(VGAM) m_elect <- vglm(Partychoice ~ Gender + West + Age + Union + Highschool + Unemployment + Pol.Interest + Democracy + Religion, family = multinomial(), data = election) effectstars(m_elect)
data(election) library(VGAM) m_elect <- vglm(Partychoice ~ Gender + West + Age + Union + Highschool + Unemployment + Pol.Interest + Democracy + Religion, family = multinomial(), data = election) effectstars(m_elect)
The data set originates from the Munich founder study. The data were collected on business founders who registered their new companies at the local chambers of commerce in Munich and surrounding administrative districts. The focus was on survival of firms measured in 7 categories, the first six represent failure in intervals of six months, the last category represents survival time beyond 36 months.
A data frame with 1224 observations on the following 16 variables.
Survival of firms in ordered categories
with levels 1
< 2
< 3
< 4
< 5
< 6
< 7
Economic Sector with levels
industry
, commerce
and service industry
Legal form with levels small trade
, one
man business
, GmBH
and GbR, KG, OHG
Location with levels residential area
and
business area
New Foundation or
take-over with levels new foundation
and take-over
Pecuniary reward with levels main
and
additional
Seed capital with levels
< 25000
and > 25000
Equity capital with levels no
and yes
Debt capital with levels no
and
yes
Market with levels local
and
national
Clientele with levels wide
spread
and small
Educational level with
levels no A-levels
and A-Levels
Gender with levels female
and male
Professional experience with levels < 10
years
and > 10 years
Number of employees
with levels 0 or 1
and > 2
Age of the founder at formation of the company
Muenchner Gruender Studie
Bruederl, J. and Preisendoerfer, P. and Ziegler, R. (1996): Der Erfolg neugegruendeter Betriebe: eine empirische Studie zu den Chancen und Risiken von Unternehmensgruendungen, Duncker & Humblot.
## Not run: data(insolvency) insolvency$Age <- scale(insolvency$Age) my_formula <- Insolvency ~ Age + Gender m_acat <- vglm(my_formula, data = insolvency,family = acat()) m_cratio <- vglm(my_formula, data = insolvency,family = cratio()) m_sratio <- vglm(my_formula, data = insolvency,family = sratio()) m_cumulative <- vglm(my_formula, data = insolvency,family = cumulative()) summary(m_acat) effectstars(m_acat, p.values = TRUE) summary(m_cratio) effectstars(m_cratio, p.values = TRUE) summary(m_sratio) effectstars(m_sratio, p.values = TRUE) summary(m_cumulative) effectstars(m_cumulative, p.values = TRUE) ## End(Not run)
## Not run: data(insolvency) insolvency$Age <- scale(insolvency$Age) my_formula <- Insolvency ~ Age + Gender m_acat <- vglm(my_formula, data = insolvency,family = acat()) m_cratio <- vglm(my_formula, data = insolvency,family = cratio()) m_sratio <- vglm(my_formula, data = insolvency,family = sratio()) m_cumulative <- vglm(my_formula, data = insolvency,family = cumulative()) summary(m_acat) effectstars(m_acat, p.values = TRUE) summary(m_cratio) effectstars(m_cratio, p.values = TRUE) summary(m_sratio) effectstars(m_sratio, p.values = TRUE) summary(m_cumulative) effectstars(m_cumulative, p.values = TRUE) ## End(Not run)
The data origin from a survey refering to the plebiscite in Chile 1988. The chilean people had to decide, wether Augusto Pinochet would remain president for another ten years (voting yes) or if there would be presidential elections in 1989 (voting no).
A data frame with 2431 observations on the following 7 variables.
Gender with levels female
and
male
Educational level with levels
low
and high
Respondent from
Santiago City with levels no
and yes
(Standardized) Monthly Income in Pesos
(Standardized) Population size of respondent's community
(Standardized) Age in years
Response with levels
Abstention
, No
, Undecided
and Yes
R package carData: Chile
Fox, J. (2008): Applied Regression Analysis and Generalized Linear Models, Second Edition.
## Not run: data(plebiscite) m_chile <- vglm(Vote ~ ., family = multinomial(), data = plebiscite) effectstars(m_chile) ## End(Not run)
## Not run: data(plebiscite) m_chile <- vglm(Vote ~ ., family = multinomial(), data = plebiscite) effectstars(m_chile) ## End(Not run)
Control function to set graphical parameters for method effectstars
.
star.ctrl(lwd.circle = 1, col.circle = "yellowgreen", lty.circle = "solid", col.fill = "yellowgreen", lwd.star = 1.5, cex.main = 1.5, cex.labels = 1, col.main = "black", col.labels = "black", col.star = "black", dist.labels = 1, font.labels = 1, radius = 1)
star.ctrl(lwd.circle = 1, col.circle = "yellowgreen", lty.circle = "solid", col.fill = "yellowgreen", lwd.star = 1.5, cex.main = 1.5, cex.labels = 1, col.main = "black", col.labels = "black", col.star = "black", dist.labels = 1, font.labels = 1, radius = 1)
lwd.circle |
Line width of circle. |
col.circle |
Color of circle, possibly a vector with one value per covariate. |
lty.circle |
Line type of circle. |
col.fill |
Color to fill the circle, possibly a vector with one value per covariate. |
lwd.star |
Line width for effect star. |
cex.main |
Size of mains. |
cex.labels |
Size of labels. |
col.main |
Color of mains. |
col.labels |
Colors of labels. Can be a vector (one value/color per category) or a even matrix (one column per category, one row per star). |
col.star |
Color of effect star. |
dist.labels |
Tuning parameter for distance of labels from effect star. Default is 1, higher values increase the distance of the labels to effect stars. Can also be specified as a vector, containing one value per star. |
font.labels |
Font type of labels. Can be a vector (one value/color per category) or a even matrix (one column per category, one row per star). |
radius |
Radius for circle. Can also be specified as a vector, containing one value per star. |
Gunther Schauberger
[email protected]
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, G. and Schauberger, G. (2013): Visualization of Categorical Response Models -
from Data Glyphs to Parameter Glyphs, Journal of Computational and Graphical Statistics 22(1), 156–177.
Gerhard Tutz (2012): Regression for Categorical Data, Cambridge University Press
## Not run: data(election) library(VGAM) m_elect <- vglm(Partychoice ~ Gender + West + Age + Union + Highschool + Unemployment + Pol.Interest + Democracy + Religion, family = multinomial(), data = election) ctrl <- star.ctrl(col.labels = c("black","red2","yellow2","green2","darkred"), col.star = "darkgray", col.fill = "lightblue", col.circle = "darkgray", cex.labels = 1.1) effectstars(m_elect, control = ctrl) ## End(Not run)
## Not run: data(election) library(VGAM) m_elect <- vglm(Partychoice ~ Gender + West + Age + Union + Highschool + Unemployment + Pol.Interest + Democracy + Religion, family = multinomial(), data = election) ctrl <- star.ctrl(col.labels = c("black","red2","yellow2","green2","darkred"), col.star = "darkgray", col.fill = "lightblue", col.circle = "darkgray", cex.labels = 1.1) effectstars(m_elect, control = ctrl) ## End(Not run)