No articles match
The HistData Challenge: Re-Visioning Historical Graphics11 days ago
Introduction | Challenges | A tiny motivating example: Arbuthnot | What is re-visioning? | Digital history | A taxonomy of re-visions | 1. Software/language ports | Data structures | 2. Design variations | 3. Interactive/web-based | 4. Temporal/animated | 5. Alternative representations | 6. Data packaged for reuse | Challenges already named in HistData | Case study: Minard | A software/language port, built from Minard.cities/Minard.troops/Minard.temp | Wilkinson's GoG specification | A few more, from the gallery | Case study: Perozzo | Re-vision 1: ggplot2 raster + contour | Re-vision 2: a fake-3D isometric shear | Re-vision 3: an interactive plotly surface | Still open | Case study: Snow, via John Russell's 30DayChartChallenge | Open invitations | Going further | References
Guerry data: Maps with sf and ggplot213 days ago
Converting to sf | A basic map | Choropleth maps | Small multiples of the main variables | Region map with department labels | Next steps | References
Guerry data: Multivariate Analysis13 days ago
Load data and packages | Guerry data set | Guerry's questions | Multivariate visualization methods | Data plots | Density plots | Bivariate relations | Reconnaisance plots | Corrgrams | Biplots | Models | Predicting crime: Univariate regression | Predicting crime: Multivariate regression | HE plots | Canonical plots | References
HE plot MANOVA Examples15 days ago
Multivariate Analysis of Variance Designs | Adolescent Mental Health Data | Exploratory plots | Fit the MLM | Testing linear hypotheses | HE plot | Plastic film data | Multivariate tests | HE plots | Effects of physical attractiveness on mock jury decisions | Manipulation check | Main analysis | Egyptian skulls from five epochs | References
Combining Colors and Patterns18 days ago
Palettes that combine color and hatching | The long way: one mapping and one scale per property | The short way: aes_cheysson() and scale_cheysson() | Why both are needed | Legends | Ordered data: sequential and diverging palettes | Missing values | Applying only some aesthetics | What is not included
Getting Started with ggCheysson18 days ago
Introduction | Loading Fonts | Color Palettes | Scatterplot with Sequential Palette | Scatterplot with Categorical Palette | Bar Charts with Patterns | Line Graphs: Time Series | Stacked Area Chart | Faceted Plots: Small Multiples | Grouped Bar Chart with Patterns | Map-Style Visualization | Exploring Different Palette Types | Diverging Palette | Summary | Key Functions | Available Palettes
Mapping Guerry's Moral Statistics with Cheysson Palettes18 days ago
Introduction | Required Packages | Loading Fonts | Preparing the Data | Load and Examine Guerry's Data | Load the Map | Join Data with Map | Creating Choropleth Maps | Crime Against Persons (Sequential Palette) | Property Crime (Different Sequential Palette) | Literacy (Grouped Palette) | Literacy with Cheysson Patterns | Charitable Donations (Category Palette) | Donations with Cheysson Patterns | Illegitimate Births (Sequential Palette) | Suicides (Different Sequential Palette) | Small Multiples: Comparing Crime Types | Regional Patterns | Regions with Patterns: Classic Cheysson Cartography | Bivariate Comparison | Historical Context | About Guerry's Data | About the Variables | The Connection to Cheysson | Available Palettes | Summary | Key Cheysson Techniques Illustrated | References
Data sets in the heplots package1 months ago
Documenting package datasets | Methods | Dataset table | Concept table
HE plot MMRA Examples1 months ago
Multivariate Multiple Regression Designs | Rohwer data: Aptitude and achievement | Preliminary plots | Separate models | MANCOVA model | Testing homogeneity of regression | Recovery from hernia repair | All predictors model | Canonical analysis | Grades in a Sociology Course | Models | Screening for interactions | References
Robust Multivariate Linear Models1 months ago
Introduction | Methodology: Iteratively Reweighted Least Squares (IRLS) | The IRLS Algorithm | Features of the Implementation | Theoretical Properties | Example: Pottery Data | Classical MANOVA | Robust MANOVA | Examining the Robust Weights | Distance Plot | Hypothesis-Error (HE) plots | Classical and Robust Fits | Robust Weights | Multivariate Influence Plots | Interpretation and Discussion | References
Univariate versus Multivariate Influence1 months ago
Load packages | A Toy Example | Models | Cook's D | DFBETAS | What happended here? | Comparing Coefficients | car::confidenceEllipse() | heplots::coefplot() | References
Introducing ggmosaic2: an enhanced ggmosaic1 months ago
Basic Appearance | Utilizing the top and right axes | theme_mosaic() | Spacing of cells | Faceting is Fixed | Residual-Based Shading | Sharing settings between mosaic layers | Other fixes/changes | References
ggmosaic and Loglinear Models1 months ago
Introduction | Basic Example: Independence Model | Simple Mosaic Plot (No Model) | Extended Mosaic Plot with Residual Shading | Model Specification | 1. Shortcut Strings | 2. Custom Formulas | 3. Conditional Independence | Interpreting Residuals | What Do Residuals Mean? | Three-Way Tables | Labeling Cells with Values | Display Observed Counts | Display Residuals | Display Expected Frequencies | The Four Display Options | Customizing the Color Scale | Text Aesthetics | Complete Example: Comparing Models | References | Session Info
Three Forms of Frequency Tables for Mosaic Displays1 months ago
Introduction | The Three Forms | Table Form | Frequency Form | Case Form | Converting Between Forms | Examples | Using Each Form with geom_mosaic() | Working with the Three-Way Table: Hair × Eye × Sex | Using Conditioning Variables | Default Shading vs. Residual-Based Shading | Default Shading | Residual-Based Shading | Independence Model for Two-Way Table | Adding Cell Values | Independence Model for Three-Way Table | Custom Models | Comparing Observed and Expected | Summary | Key Takeaways | Recommendations | References | Session Info
Mosaic plots with ggplot23 months ago
How to use ggmosaic | Examples | One variable | Two variables | Conditioning | Alternative to conditioning: faceting | The importance of ordering | Other features of geom_mosaic() | Divider function: Types of partitioning | Partitioning with one or more variables | Adjusting the offset | Version compatibility issues with ggplot2
tidyCat: Tidy Methods For Categorical Data Analysis3 months ago
Frequency tables need some Tidy Love ❤️ | Constructing categorical data sets | Manipulating categorical data sets | Manipulating factor levels | Models | Graphical methods | Some tidy stuff | References
Displaying nestedLogit Models as LaTeX Equations5 months ago
Overview | Fitting a nested logit model | Symbolic equations | Work dichotomy (not working vs. working) | Full-time dichotomy (part-time vs. full-time) | Logit notation | Using extract_eq() options | Equations with fitted coefficients | Coloring symbols | Equations for individual sub-models | Using the raw LaTeX | Alligator food choice: gators data | References
Creating and manipulating frequency tables 5 months ago
Forms of frequency data | Case form | Frequency form | Table form | Ordered factors and reordered tables | Re-ordering dimensions | structable() | table() and friends | xtabs() | Collapsing over table factors: aggregate(), margin.table() and apply() | Collapsing table levels: collapse.table() | Collapsing table levels: dplyr | Collapsing table levels: collapse_levels() | Converting among frequency tables and data frames | Tidy conversions | A complex example | References
1a. Steps Toward Tidy Categorical Data Analysis5 months ago
Overview | Tidy Collapsing | Tidy Conversions | Proportions | Taken Together
Nested-dichotomies logistic regression models7 months ago
Models for polytomous responses | Multinomial logit model | Nested-dichotomies logit model | Example: Women's labor-force participation | Defining nested dichotomies | Using dichotomy() and logits() to define the response | Using nestedLogit() to fit the model | Methods for "nestedLogit" objects | Obtaining fitted values: predict() | Plotting "nestedLogit" objects | Effect plots for "nestedLogit" models | Alternative models for the Womenlf data | References
Other Examples of Nested Logit Models7 months ago
Introduction | Load packages | Chilean plebiscite voting intent (carData::Chile) | Data | Two competing tree structures | Engagement-first tree | Direction-first tree | Fitting the models | Omnibus tests | Which tree fits better? | Pseudo-R² measures | Predicted probabilities | Plotting logits | Travel mode choice (AER::TravelMode) | Data structure | Nesting structure | Fitting | Model comparison | Fishing mode choice (mlogit::Fishing) | Overview | Plots | Arthritis treatment outcome (vcd::Arthritis) | Plotting | Smoking status (MASS::survey) | Ordinal examples — brief sketches | Pneumoconiosis severity (VGAM::pneumo) | Mental health status (Agresti) | Session info | References
Using ggeffects with nestedLogit models8 months ago
Overview | 👩 Women's labor force participation | Predicted probabilities with predict_response() | Customizing the plot | Plotting on the logit scale | Plotting the dichotomies | 🐊 Alligator food choice | Summary | References
Primer for Full House Modeling8 months ago
Introduction | Ingredients for Full House Modeling | Probability Integral Transform | Order Statistics | The Core of Full House Modeling | Simple Setup: one source population and system | More General Setup: multiple source populations and systems | Example: Comparing Batting Averages Across Eras | Z-scores | Full House Modeling | Discussion | References
Run Scoring Trends8 months ago
Run scoring trends: Sub-titles and captions with ggplot2 | Read and summarize the data | A basic plot | Adding a subtitle: the function
Graphs of Hits By Type in MLB8 months ago
The Batting data | Data munging | Graphs | Add trend lines | Further analyses: Your turn
Relationship Between Strikeouts and Home Runs8 months ago
The data files | The Batting data
Hex Logo Design for CASIdata R Package9 months ago
Step 1: Image Cleaning | Step 2: Logo Conceptualization | Step 3: Refinement & Subtext | Step 4: Final Correction | Conclusion | Claude Replies
Continuous predictors 10 months ago
Spine and conditional density plots | Model-based plots: effect plots and ggplot2 plots | References
Diabetes data: heplots and candisc examples11 months ago
Background | Setting up | Data ellipsoids and homogeneity of variance | Box's M test | Fit the MLM | Examine residuals in a QQ plot | HE plots | Canonical discriminant analysis | Canonical discriminant plot | Canonical HE plot | Other analyses | Linear and quadratic discriminant analysis | Recursive partitioning | References
Printing Text in Color in Markdown / Quarto11 months ago
Normal usage | Named colors | LaTeX color names | Hex colors | Defining color variables in your document
Vignette Introduction1 years ago
Introduction | Contents | Further reading | Books | Articles, blog entries, and course materials
Tests of Independence 1 years ago
CrossTable | Chi-square test | Fisher Exact Test | Mantel-Haenszel test and conditional association | Some plot methods | Fourfold displays | Doubledecker plots | Odds ratio plots | Cochran-Mantel-Haenszel tests for ordinal factors | Measures of Association | Measures of Agreement | Correspondence analysis
Duplicate and Missing Cases in Snow.deaths1 years ago
Guerry data: Spatial Multivariate Analysis2 years ago
Preliminary steps | Standard approaches | Multivariate analysis | Spatial autocorrelation | The spatial weighting matrix | Moran's Coefficient | Moran scatterplot | Indirect integration of multivariate and geographical aspects | Spatial multivariate analysis | Spatial partition | Spatial explanatory variables | Trend surface of geographic coordinates | Moran's eigenvector maps | Spatial graph and weighting matrix | Conclusions | References
LaTeX Equations with latexMatrix, Eqn and matrix2latex2 years ago
Using latexMatrix() and Eqn() | The SVD | Systems of equations | aligned environment | Decorators | Computing with "latexMatrix" objects | Matrix products and transpose | Determinants & inverse | Linear hypotheses | Partitioned matrices, indexing & binding | Kronecker products | matrix2latex | showEqn | References
Loglinear Models 2 years ago
Fitting with loglm() | Fitting with glm() and gnm() | Non-linear terms | References
Mosaic plots 2 years ago
Permuting variable levels | Square tables | Correspondence analysis ordering | References
Demo - Housing Data 2 years ago
Load packages | Housing data | Variables, levels and models | Null model | Baseline model | Visualising model fit | Ordering the variables in the mosaic | Adding association terms | Did the model get better? | Visualize model glm1 | Can we drop any terms? | What about two-way interactions? | Model parsimony: AIC & BIC
Mobility tables 2 years ago
Social mobility | Models | Hauser data | Load packages | Mosaic plots | Fitting and graphing models | Quasi-independence | Symmetry and quasi-symmetry | Topological models | Ordinal tables | Model comparison plots | References
Datasets for categorical data analysis2 years ago
Processing tags | Make this into a nice table | Add links to help() | Make the table
Properties of determinants 2 years ago
Create a 2 x 2 matrix | 1. Interchange two rows or cols changes the sign: -> -1 * det(A) | 2. transpose -> det (A) unchanged | 3. multiply row * k -> k * det(A) | 4. multiply matrix * k -> k^2 * det(A) | 5. det (A B) -> det(A) * det(B) | 6. proportional rows or columns -> det() == 0 | 7. Add multiple of one row to another -> det unchanged | 8. Geometric interpretation
Gram-Schmidt Orthogonalization and Regression 2 years ago
Setup | Orthogonalization by projections | Relationship to QR factorization | Regression with X and Z
Vector Spaces of Least Squares and Linear Equations 2 years ago
Data space | Linear equation ($\beta$) space | Observation space | References
Evaluation of determinants 2 years ago
1. Calculate det() by cofactor expansion | Find cofactors of row 1 elements | det() = product of row with cofactors | 2. Finding det() by Gaussian elimination (pivoting) | Repeat, reducing new row, col 1 to 0 | Repeat once more. d = det(M)
Inverse of a matrix 2 years ago
Load the matlib package | Create a 3 x 3 matrix | Basic properties | 1. det(A) != 0, so inverse exists | 2. Definition of the inverse: $A^{-1} A = A A^{-1} = I$ or AI * A = diag(nrow(A)) | 3. Inverse is reflexive: inv(inv(A)) = A | 4. inv(A) is symmetric if and only if A is symmetric | More properties of matrix inverse | 1. inverse of diagonal matrix = diag( 1/ diagonal) | 2. Inverse of an inverse: inv(inv(A)) = A | 3. inverse of a transpose: inv(t(A)) = t(inv(A)) | 4. inverse of a scalar * matrix: inv( k*A ) = (1/k) * inv(A) | 5. inverse of a matrix product: inv(A * B) = inv(B) %*% inv(A) | 6. $\det (A^{-1}) = 1 / \det(A) = [\det(A)]^{-1}$ | Geometric interpretations
Matrix inversion by elementary row operations 2 years ago
Load the matlib package | Create a 3 x 3 matrix | Join an identity matrix to A | Apply elementary row operations to reduce A to an identity matrix. | 1. Using R arithmetic | 2. Do the same, using matlib functions rowadd(), rowmult() and rowswap() | 3. Using echelon()
Generalized inverse 2 years ago
Properties of generalized inverse (Moore-Penrose inverse) | Rectangular matrices
Linear transformations and matrix inverse in 3D 2 years ago
The unit cube | Define some useful functions | Show $\mathbf{I}$ and $\mathbf{A}$ all together in one figure | Same, but using separate figures, shown side by side | $A$ and $A^{-1}$ | Animate
Eigenvalues and Eigenvectors: Properties 2 years ago
Setup | Properties of eigenvalues and eigenvectors
Eigenvalues: Spectral Decomposition 2 years ago
Setup | Matrix factorization | Spectral decomposition | Further properties
Solving Linear Equations 2 years ago
Conditions for a solution | Equations in two unknowns | Two consistent equations | Three consistent equations | Three inconsistent equations | Equations in three unknowns
Team Payroll and the World Series2 years ago
The data files | The Salaries data | The Teams data | The SeriesPost data | A first look at Salaries | Get team payrolls | Merge team names into payroll | Boxplots of payroll | Correcting for inflation | Salaries of World Series winning teams | Further analyses: Your turn
Plotting nestedLogit models with ggplot22 years ago
Fitted probabilities | Plotting with ggplot2 | Direct labels | Plotting log-odds | Predicted logit values for the dichotomies | Alternative model | References
Standard Errors of Fitted Category Probabilities by the Delta Method for the Nested Logit Model3 years ago
Notation | An Example | Variances of the Estimated Probabilities | For the Dichotomous Logit Models | For the Nested Logit Model | Acknowledgment | Reference