With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.
Sub NPPlotData()
' returns n by 2 matrix where n = no. of elements in dvec
' 1st col z-scores, 2nd col normscores for n obs.
Dim M, V, r, c
Dim i As Integer, n As Integer
Dim Znmat() As Variant
Dim dvec As Range
'data input from worksheet
Set dvec = Sheets("Data").Range("dvec") 'dvec as Range object
n = Application.Count(dvec)
ReDim Znmat(n, 2)
M = Application.Average(dvec)
V = Application.Var(dvec)
For i = 1 To n
Znmat(i, 1) = (dvec(i) - M) / Sqr(V)
r = Application.Rank(dvec(i), dvec, 1)
c = (r - 3 / 8) / (n + 1 / 4)
Znmat(i, 2) = Application.NormSInv(c)
Next i
' [...]
End Sub
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.