Skip to contents

Compute a missingness-adjusted row sum.

Usage

meanSum(x)

Arguments

x

Matrix or dataframe with participants in the rows and items in the columns.

Value

Missingness-adjusted row sum.

Details

Take row mean across columns (items) and then multiply by number of items to account for missing (NA) values.

See also

Other computations: Mode(), kish_ess(), mySum()

Examples

# Prepare Data
df <- data.frame(item1 = rnorm(1000), item2 = rnorm(1000), item3 = rnorm(1000))

# Calculate Missingness-Adjusted Row Sum
df$missingnessAdjustedSum <- meanSum(df)



Developmental Psychopathology Lab