找回密码
 注册
查看: 1907|回复: 0

R语言 zipfR包 lnre.goodness.of.fit()函数中文帮助文档(中英文对照)

  [复制链接]
发表于 2012-10-2 07:47:53 | 显示全部楼层 |阅读模式
lnre.goodness.of.fit(zipfR)
lnre.goodness.of.fit()所属R语言包:zipfR

                                        Goodness-of-fit Evaluation of LNRE Models (zipfR)
                                         拟合优度评价LNRE模型(zipfR)

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This function measures the goodness-of-fit of a LNRE model compared to an observed frequency spectrum, using a multivariate chi-squared test (Baayen 2001, p. 119ff).
此功能测量的善良适合相比,的一个LNRE的模型观测到的频谱,使用多变量卡方检验(Baayen 2001年,p。119ff)。


用法----------Usage----------



  lnre.goodness.of.fit(model, spc, n.estimated=0, m.max=15)




参数----------Arguments----------

参数:model
an LNRE model object, belonging to a suitable subclass of lnre.
一个LNRE模型对象,属于lnre到适当的子类。


参数:spc
an observed frequency spectrum, i.e. an object of class spc.  This can either be the spectrum on which the model parameters have been estimated, or a different, independent spectrum.
观测到的频谱,即的对象类spc。这可以是在其上的频谱模型参数的估计,或不同的,独立的频谱。


参数:n.estimated
number of parameters of the LNRE model that have been estimated on spc.  This number is automatically subtracted from the degrees of freedom of the resulting chi-squared statistic.  When spc is an independent spectrum, n.estimated should always be set to the default value of 0.
数目已的LNRE模型参数估计的spc。此号码被自动减去所得的卡方统计的自由程度。当spc是一个独立的频谱,n.estimated应该总是被设置为默认值0。


参数:m.max
number of spectrum elements that will be used to compute the chi-squared statistic.  The default value of 15 is also used by Baayen (2001).  For small samples, it may be sensible to use fewer spectrum elements, e.g. by setting m.max=10 or m.max=5.  Depending on how many degrees of freedom have to be subtracted, m.max should not be chosen too low.
频谱的元素将被用来计算卡方统计数。的默认值15也可以用来者Baayen(2001)。对于小样本,它可能是明智的,使用较少的频谱元素,例如:通过设置m.max=10或m.max=5。根据自由度有多少要被减去,m.max不应选择太低。


Details

详细信息----------Details----------

By default, the number of spectrum elements included in the calculation of the chi-squared statistic may be reduced automatically in order to ensure that it is not dominated by the sampling error of spectrum elements with very small expected frequencies (which are scaled up due to the small variance of these random variables).  As an ad-hoc rule of thumb, spectrum elements V_m with variance less than 5 are excluded, since the normal approximation to their discrete distribution is likely to be inaccurate in this case.
缺省情况下,卡方统计的计算中包括的频谱元素的数目可能被自动降低,以确保它不与非常小的预期频率(由于缩放的频谱元素由抽样误差为主这些随机变量的方差小)。作为一个ad-hoc的经验法则,频谱元素V_m与方差小于5被排除在外,因为正常逼近其离散分布,在这种情况下,很可能是不准确的。

Automatic reduction is disabled when the parameter m.max is specified explicitly (use m.max=15 to disable automatic reduction without changing the default value).
自动还原被禁用时的参数m.max指定明确(使用m.max=15禁用自动减少,在不改变默认值的情况下)。


值----------Value----------

A data frame with one row and the following variables:
一个数据框一排和下面的变量:


参数:X2
value of the multivariate chi-squared statistic X^2
值的多变量卡方统计X^2


参数:df
number of degrees of freedom of X^2, corrected for the number of parameters that have been estimated on spc
自由X^2的程度的数量,校正参数的数目,已估计spc


参数:p
p-value corresponding to X^2
p值对应的X^2


参考文献----------References----------

Dordrecht.

参见----------See Also----------

lnre for more information about LNRE models
lnre更多信息LNRE模型


实例----------Examples----------



## load spectrum of first 100k Brown tokens[#加载光谱的第一个10万的棕色记号]
data(Brown100k.spc)

## use this spectrum to compute zm and gigp[#使用此频谱计算ZM和gigp]
## models[#模型]
zm <- lnre("zm",Brown100k.spc)
gigp <- lnre("gigp",Brown100k.spc)

## lnre.goodness.of.fit with appropriate[#lnre.goodness.of.fit适当的]
## n.estimated value produces the same multivariate[#n.estimated值产生相同的多元]
## chi-squared test that is reported in a model[卡方检验,在模型]
## summary[#总结]

## compare:[#比较:]
zm
lnre.goodness.of.fit(zm,Brown100k.spc,n.estimated=2)

gigp
lnre.goodness.of.fit(gigp,Brown100k.spc,n.estimated=3)

## goodness of fit of the 100k models calculated on the[#的100k计算的模型的拟合优度]
## whole Brown spectrum (although this is superset of[#整个布朗谱(虽然这是超集]
## 100k spectrum, let's pretend it is an independent[#10万光谱,让我们假设它是一个独立的]
## spectrum, and set n.estimated to 0)[#谱,,,并设置n.estimated 0)]

data(Brown.spc)

lnre.goodness.of.fit(zm,Brown.spc,n.estimated=0)
lnre.goodness.of.fit(gigp,Brown.spc,n.estimated=0)



转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-13 05:40 , Processed in 0.025493 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表