No articles match
Displaying nestedLogit Models as LaTeX Equations29 days 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 2 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 Analysis2 months ago
Overview | Tidy Collapsing | Tidy Conversions | Proportions | Taken Together
Nested-dichotomies logistic regression models4 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 Models4 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 models4 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 Modeling5 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 Trends5 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 MLB5 months ago
The Batting data | Data munging | Graphs | Add trend lines | Further analyses: Your turn
Relationship Between Strikeouts and Home Runs5 months ago
The data files | The Batting data
tidyCat: Tidy Methods For Categorical Data Analysis5 months ago
Constructing categorical data sets | Manipulating categorical data sets | Manipulating factor levels | Models | Graphical methods | Some tidy stuff | References
Hex Logo Design for CASIdata R Package5 months ago
Step 1: Image Cleaning | Step 2: Logo Conceptualization | Step 3: Refinement & Subtext | Step 4: Final Correction | Conclusion | Claude Replies
Getting Started with ggCheysson6 months 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 Palettes6 months 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
Continuous predictors 7 months ago
Spine and conditional density plots | Model-based plots: effect plots and ggplot2 plots | References
Data sets in the heplots package7 months ago
Documenting package datasets | Methods | Dataset table | Concept table
Robust Multivariate Linear Models7 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 | Hypothesis-Error (HE) plots
Diabetes data: heplots and candisc examples7 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 / Quarto7 months ago
Normal usage | Named colors | LaTeX color names | Hex colors | Defining color variables in your document
Vignette Introduction10 months ago
Introduction | Contents | Further reading | Books | Articles, blog entries, and course materials
Univariate versus Multivariate Influence11 months ago
Load packages | A Toy Example | Models | Cook's D | DFBETAS | What happended here? | References
Tests of Independence 11 months 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
HE plot MANOVA Examples1 years 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
HE plot MMRA Examples1 years 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
Duplicate and Missing Cases in Snow.deaths1 years ago
Guerry data: Spatial Multivariate Analysis1 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
Guerry data: Multivariate Analysis1 years 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
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
HE Plots for Repeated Measures Designs2 years ago
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