Learn R Programming

⚠️There's a newer version (1.8.157) of this package.Take me there.

rockchalk (version 1.8.144)

Regression Estimation and Presentation

Description

A collection of functions for interpretation and presentation of regression analysis. These functions are used to produce the statistics lectures in . Includes regression diagnostics, regression tables, and plots of interactions and "moderator" variables. The emphasis is on "mean-centered" and "residual-centered" predictors. The vignette 'rockchalk' offers a fairly comprehensive overview. The vignette 'Rstyle' has advice about coding in R. The package title 'rockchalk' refers to our school motto, 'Rock Chalk Jayhawk, Go K.U.'.

Copy Link

Version

Install

install.packages('rockchalk')

Monthly Downloads

15,222

Version

1.8.144

License

GPL (>= 3.0)

Maintainer

Paul Johnson

Last Published

March 8th, 2019

Functions in rockchalk (1.8.144)

combineLevels

recode a factor by "combining" levels
dir.create.unique

Create a uniquely named directory. Appends number & optionally date to directory name.
focalVals

Create a focal value vector.
drawnorm

draw a normal distribution with beautiful illustrations
mcDiagnose

Multi-collinearity diagnostics
print.pctable

Display pctable objects
mcGraph1

Illustrate multicollinearity in regression, part 1.
plot.testSlopes

Plot testSlopes objects
predictOMatic

Create predicted values after choosing values of predictors. Can demonstrate marginal effects of the predictor variables.
removeNULL

Remove NULL values variables from a list
plotCurves

Assists creation of predicted value curves for regression models.
formatSummarizedFactors

Prints out the contents of an object created by summarizeFactors in the style of base::summary
lazyCor

Create correlation matrices.
lazyCov

Create covariance matrix from correlation and standard deviation information
centralValues

Central Tendency estimates for variables
meanCenter

meanCenter
residualCenter

Calculates a "residual-centered" interaction regression.
summary.pctable

Extract presentation from a pctable object
cheating

Cheating and Looting in Japanese Electoral Politics
model.data

Create a "raw" (UNTRANSFORMED) data frame equivalent to the input data that would be required to fit the given model.
genCorrelatedData2

Generates a data frame for regression analysis.
testSlopes

Hypothesis tests for Simple Slopes Objects
newdata

Create a newdata frame for usage in predict methods
print.summarize

print method for output from summarize
print.summary.pctable

print method for summary.pctable objects
outreg

Creates a publication quality result table for regression models. Works with models fitted with lm, glm, as well as lme4.
summarizeNumerics

Extracts numeric variables and presents an summary in a workable format.
genCorrelatedData3

Generate correlated data for simulations (third edition)
summary.factor

Tabulates observed values and calculates entropy
getDeltaRsquare

Calculates the delta R-squares, also known as squared semi-partial correlation coefficients.
vech2Corr

Convert the vech (column of strictly lower trianglar values from a matrix) into a correlation matrix.
getFocal

Select focal values from an observed variable.
makeSymmetric

Create Symmetric Matrices, possibly covariance or correlation matrices, or check a matrix for symmetry and serviceability.
makeVec

makeVec for checking or creating vectors
vech2mat

Convert a half-vector (vech) into a matrix.
rbindFill

Stack together data frames
religioncrime

Religious beliefs and crime rates
waldt

T-test for the difference in 2 regression parameters
genX

Generate correlated data (predictors) for one unit
getAuxRsq

retrieves estimates of the coefficient of determination from a list of regressions
lmAuxiliary

Estimate leave-one-variable-out regressions
magRange

magRange Magnify the range of a variable.
plotFancy

Regression plots with predicted value lines, confidence intervals, color coded interactions
plotFancyCategories

Draw display for discrete predictor in plotSlopes
plotSlopes

Generic function for plotting regressions and interaction effects
predictCI

Calculate a predicted value matrix (fit, lwr, upr) for a regression, either lm or glm, on either link or response scale.
rockchalk-package

rockchalk: regression functions
cutBySD

Returns center values of x, the mean, mean-std.dev, mean+std.dev
se.bars

Draw standard error bar for discrete variables
cutByTable

Select most frequently occurring values from numeric or categorical variables.
cutFancy

Create an ordinal variable by grouping numeric data input.
descriptiveTable

Summary stats table-maker for regression users
getPartialCor

Calculates partial correlation coefficients after retrieving data matrix froma fitted regression model
getVIF

Converts the R-square to the variance inflation factor
model.data.default

Create a data frame suitable for estimating a model
mvrnorm

Minor revision of mvrnorm (from MASS) to facilitate replication
pctable

Creates a cross tabulation with counts and percentages
perspEmpty

perspEmpty
plotPlane

Draw a 3-D regression plot for two predictors from any linear or nonlinear lm or glm object
plotSeq

Create sequences for plotting
summarize

Sorts numeric from discrete variables and returns separate summaries for those types of variables.
summarizeFactors

Extracts non-numeric variables, calculates summary information, including entropy as a diversity indicator.
checkIntFormat

A way of checking if a string is a valid file name.
formatSummarizedNumerics

Reformat numeric summarize output as one column per variable, similar to R summary
checkPosDef

Check a matrix for positive definitness
genCorrelatedData

Generates a data frame for regression analysis
gmc

Group Mean Center: Generate group summaries and individual deviations within groups
kurtosis

Calculate excess kurtosis
outreg2HTML

Convert LaTeX output from outreg to HTML markup
padW0

Pad with 0's.
skewness

Calculate skewness
standardize

Estimate standardized regression coefficients for all variables
addLines

Superimpose regression lines on a plotted plane
centerNumerics

Find numeric columns, center them, re-name them, and join them with the original data.
cutByQuantile

Calculates the "center" quantiles, always including the median, when n is odd.