View source: R/Kernel Equating Functions.R
DistToMuSig | R Documentation |
Function to calculate mu and sigma from a score distribution
DistToMuSig(scores, count)
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. |
The function returns a list with the following elements:
The mean.
The standard deviation.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.