数据拟合检验属于包裹柯西或冯·米塞斯

时间:2019-11-04 12:05:40

标签: r

我的工作中有错误数据,我需要测试它是否属于von Mises或包装的柯西分布。我用von Mises的watson.test和包裹的柯西分布mwrapped柯西测试。 但是在我的工作中出现在R中的这个问题的问题找不到函数“ mwrapped”,“ watson”。 例如我们测试epsilon

epsilon<-c( 2.49723058,-0.3950603,-0.5350603 ,-1.899642  , 1.18661
   , -1.773387,-2.93964, 2.16494 , -0.8042236  , -0.2996419,
    0.98035807 , -0.9119328  ,2.238904   ,-1.333387 ,-0.13193,
   0.443486, -0.5242236  ,2.368067  ,0.400358  ,-1.748805,
   -1.437969,0.1497405  ,2.12661  , 1.248067 ,0.055776,
    0.0126489 , 1.48807 ,  0.69432  ,1.37745 ,-0.78881,
 0.11578 ,1.97723 , 1.76494  ,  2.109521  ,0.1849397,
   -1.39796863 ,-1.754841  ,1.525159  ,-1.936514  ,-1.579642,
 -0.276514 , 2.16494,  1.100358 ,-1.18255  ,0.772868,
    1.460577 ,-0.6994228 ,-0.125678,  -1.127351  ,-0.9550603,
    -1.127351,  0.3220314    , 1.08515885  ,  0.74057718 ,-0.05797,
    -1.139642,-0.231933,-1.567351 ,   0.49723058 ,   2.42974053,
   -0.08713198 , -1.151714 ,-0.9917137   ,-1.268805 ,-0.25506 ,
    -0.25506,  1.49723058  ,-2.557969 ,-2.407132   , -2.43171366,
    -0.367132 ,-2.041096  ,-2.23506  ,1.60494  ,  1.60494,
    2.746613,-0.207132 ,-1.14255  ,1.39578 ,-0.7950603,
    0.2818122, -0.8904786  ,  0.49723058 ,0.7126489 ,-1.1691,
 -1.29339 ,-2.14277,-0.5458969  ,-0.3950603 , 1.60494,
   1.60494,2.820358, 0.5434855,1.30036 ,-1.299642,
  -0.1150603)

watson.test(epsilon, alpha=0, dist= "vonmises")

mwrappedg("cauchy",epsilon,starts=c(1,1),K=10,method="BFGS")

1 个答案:

答案 0 :(得分:0)

基R不能使用watson.testmwrappedg之类的功能,这就是显示这些错误的原因。对于watson.test,您必须使用circular R包;对于mwrappedg,您必须使用Wrapped R包。首先,您必须安装它们,然后可以使用like

install.packages(c("circular","Wrapped")
library(circular)
watson.test(x, alpha=0.05, dist="vonmises")
library(Wrapped)
mwrappedg("cauchy", epsilon, starts=c(1,1), K=10, method="BFGS")