我很抱歉这个愚蠢的问题,我注意到每次我在同一个变量上运行white.test时,每次都会给出不同的结果
注意:这是titeies包的white.test而不是bstat包
> white.test(ts(ret.fin.chn))
White Neural Network Test
data: ts(ret.fin.chn)
X-squared = 12.6327, df = 2, p-value = 0.001806
> white.test(ts(ret.fin.chn))
White Neural Network Test
data: ts(ret.fin.chn)
X-squared = 11.5476, df = 2, p-value = 0.003108
> white.test(ts(ret.fin.chn))
White Neural Network Test
data: ts(ret.fin.chn)
X-squared = 9.9916, df = 2, p-value = 0.006766
>white.test(ts(ret.fin.chn))
White Neural Network Test
data: ts(ret.fin.chn)
X-squared = 12.5531, df = 2, p-value = 0.00188
注意:ret.fin.chn是一个xts类,因此ts()
我也想知道white.test
的代码
我使用了getAnywhere
和methods()
但没有得到一件事
> getAnywhere(white.test)
A single object matching ‘white.test’ was found
It was found in the following places
package:tseries
namespace:tseries
with value
function (x, ...)
UseMethod("white.test")
<environment: namespace:tseries>
现在这就是我最终的结果
> methods(white.test)
[1] white.test.default* white.test.ts*
Non-visible functions are asterisked
这是我得到的,我不知道下一步该做什么
> methods(white.test.default.tseries)
Error in methods(white.test.default.tseries) :
object 'white.test.default.tseries' not found
> methods(white.test.default)
Error in methods(white.test.default) :
object 'white.test.default' not found
> methods(white.test.default.ts)
Error in methods(white.test.default.ts) :
object 'white.test.default.ts' not found