http://www.un.org/Depts/DGACM/index_russian.htm
Ordinates for Probability Plotting
Description:
Generates the sequence of probability points ‘(1:m - a)/(m +
(1-a)-a)’ where ‘m’ is either ‘n’, if ‘length(n)==1’, or
‘length(n)’.
Usage:
ppoints(n, a = ifelse(n <= 10, 3/8, 1/2))
...
我曾试图在<代码>python上复制这一功能,我有两点怀疑。
1- The first m
in (1:m - a)/(m + (1-a)-a)
is persistent an integer: int(n)
(e:the integer of
2- The second m
in the sameality is NOT an integer if length (n)==1
(它承担<代码>n和 a integer (length(n)
)其他用途。
3- The n
in a = 如果else(n <= 10, 3/8, 1/2)
is the real number n
if length(n)==1
and the integer >codelength(n) otherwise.
描述中根本没有阐明这一点,我非常赞赏有人能够证实情况确实如此。
Add
最初张贴在https://stats.stackchange.com/。 因为我希望得到与<代码>ppoints功能有关的静态人员的投入。 自我迁出后,我写到以下职能之后,复制了<代码>ppoints,载于python
。 我对此进行了测试,而且这两种结果似乎都回过头来,但如果有人能够澄清上述要点,因为职能说明根本不明确。
def ppoints(vector):
Mimics R s function ppoints .
m_range = int(vector[0]) if len(vector)==1 else len(vector)
n = vector[0] if len(vector)==1 else len(vector)
a = 3./8. if n <= 10 else 1./2
m_value = n if len(vector)==1 else m_range
pp_list = [((m+1)-a)/(m_value+(1-a)-a) for m in range(m_range)]
return pp_list