[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: AW: ksmirnov

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: AW: ksmirnov
Date   Mon, 28 Sep 2009 15:07:12 +0100

Also, look carefully at a graph. There doesn't seem to be a -qt- but
-qnorm- is much better than nothing. You should expect to see symmetric
and systematic deviation from normal (Gaussian) expectation. 

[email protected] 

Martin Weiss

As Maarten said back in the day
(, you have
-simulate- these things to make up your own mind whether you are on the
right path:

//drop it beforehand
capt prog drop sim

//define the program
program define sim 
    version 11
    syntax [, df(integer 5) obs(real 10000)]
    drop _all
    set obs `obs'
    tempvar z
    gen `z' = rt(`df')
    ksmirnov `z' = 1-ttail(`df',`z')

//simulate it!
simulate pcor=r(p_cor), /* 
 */ reps(1000): sim 

qui cou if pcor<0.05
di in red "Rejections: `r(N)', " /* 
*/ "for a rate of: " r(N)/c(N)

Tzygmund mcfarlane

I am trying to test if a series is t-distributed with (say) 6 degrees
of freedom using a Kolmogorov-Smirnov test. Is this the right way to
do it?

webuse wpi1
g returns = D.ln_wpi
ksmirnov returns = 1-ttail(6, returns)

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index