top of page

Descriptive Statistics

KEY:

ds = dataset you are currently using.

​

DV = dependent variable of interest

​

IV = independent variable of interest

​

XYXY = dummy name for a variable, matrix, or data frame into which you are moving information.

Extract overall descriptive statistics from a processed set

The cleanest way to get a broad set of descriptives is to use the describe function from the psych package.

  • “ds[-1]” removes the first column from descriptes. In this case, the subject number. Modify as needed.

  • “na.rm = TRUE” tells it to ignore missing data.

  • “type” refers to how skew and kurtosis are calculated.

_____________________________

library(psych)

XYXY <- describe(ds[-1], na.rm = TRUE, type = 2)

_____________________________

 

You can easily export this information to your working directory using the following command:

_____________________________

write.csv(XYXY, "NameYouWant.csv", row.names = TRUE)

_____________________________

bottom of page