DistToMuSig: Function to calculate mu and sigma from a score distribution

View source: R/Kernel Equating Functions.R

DistToMuSigR Documentation

Function to calculate mu and sigma from a score distribution

Description

Function to calculate mu and sigma from a score distribution

Usage

DistToMuSig(scores, count)

Arguments

scores

Vector of possible scores

count

Number of people achieving each score (weighted numbers, probabilities or proportions also acceptable). Must be same length as scores.

Value

The function returns a list with the following elements:

mu

The mean.

sigma

The standard deviation.

Examples

x=pmax(0,pmin(10,round(rnorm(200,5,2))))
counts=200*(ecdf(x)(0:10)-ecdf(x)(-1:9))#used rather than "table" so all scores included even if zero count
DistToMuSig(0:10,counts)


CambridgeAssessmentResearch/KernEqWPS documentation built on Feb. 23, 2024, 9:34 p.m.