Learn R Programming

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

sjmisc (version 1.0.3)

Miscellaneous Data Management Tools

Description

Collection of several utility functions (especially intended for people coming from other statistical software packages like 'SPSS', and/or who are new to R), supporting following common tasks: 1) Reading and writing data between R and other statistical software packages like 'SPSS', 'SAS' or 'Stata' and working with labelled data; this includes easy ways to get and set label attributes, to convert labelled vectors into factors (and vice versa) etc. 2) Data transformation tasks like recoding, dichotomizing or grouping variables, setting and replacing missing values. 3) Convenient functions to perform frequently used statistical tests, or to calculate various commonly used statistical coefficients.

Copy Link

Version

Install

install.packages('sjmisc')

Monthly Downloads

34,037

Version

1.0.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Daniel Lüdecke

Last Published

June 20th, 2015

Functions in sjmisc (1.0.3)

chisq_gof

Chi-square goodness-of-fit-test
phi

Phi value for contingency tables
cronb

Cronbach's Alpha for a matrix or data frame
set_val_labels

Attach value labels to variables
is_num_fac

Check whether a factor has numeric levels only
rmse

Root Mean Squared Error (RMSE)
cv

Coefficient of Variation
weight

Weight a variable
mean_n

Row means with min amount of valid values
add_labels

Set back value and variable labels to subsetted data frames
get_values

Retrieve values of labelled variables
hoslem_gof

Hosmer-Lemeshow Goodness-of-fit-test
mic

Mean Inter-Item-Correlation
rec

Recode numeric variables
str_pos

Find partial matching and close distance elements in strings
get_val_labels

Retrieve value labels of a data frame or variable
is_crossed

Check whether two factors are crossed
mwu

Mann-Whitney-U-Test
is_nested

Check whether two factors are nested
to_fac

Convert variable into factor and keep value labels
read_stata

Import STATA dataset as data frame into R
efc

Sample dataset from the EUROFAMCARE project
group_str

Group near elements of string vectors
remove_labels

Remove value and variable labels from vector or data frame
weight2

Weight a variable
write_spss

Write content of data frame to SPSS sav-file
replace_na

Replace NA with specific values
write_stata

Write content of data frame to STATA dta-file
set_var_labels

Attach variable label(s) to variables
cod

Tjur's Coefficient of Discrimination
read_spss

Import SPSS dataset as data frame into R
is_odd

Check whether value is odd
is_even

Check whether value is even
levene_test

Plot Levene-Test for One-Way-Anova
read_sas

Import SAS dataset as data frame into R
group_var

Recode count variables into grouped factors
std_beta

Standardized Beta coefficients and CI of lm and mixed models
set_na

Set NA for specific variable values
recode_to

Recode variable categories into new values
get_var_labels

Retrieve variable labels of a data frame or variable
reliab_test

Performs a reliability test on an item scale
table_values

Expected and relative table values
std_e

Standard Error for variables
to_label

Convert variable into factor and replaces values with associated value labels
is_empty

Check whether string is empty
to_value

Convert factors to numeric variables
word_wrap

Insert line breaks in long labels
dicho

Dichotomize variables
icc

Intra-Class-Correlation Coefficient
sjmisc-package

Miscellaneous Data Management Tools
eta_sq

Eta-squared of fitted anova
group_labels

Create labels for recoded groups
pseudo_r2

Nagelkerke's and Cox-Snell's Pseudo R-squared
trim

Trim leading and trailing whitespaces from strings
to_sjPlot

Convert a haven-imported data frame to sjPlot format
cramer

Cramer's V for a contingency table