[RkWard-devel] Help for bonnett test
SJR
stefan_roediger at gmx.de
Thu Feb 22 18:30:32 UTC 2007
Am Mittwoch, 21. Februar 2007 14:13 schrieb Thomas Friedrichsmeier:
> Hi,
>
> On Wednesday 21 February 2007 00:00, Stefan Roediger wrote:
> > this will become the plug-in for the bonett.test (moments package). I try
> > to follow the guidelines (regarding the new technologies) but get into
> > trouble. Basically it's working but I can't get 'z' (transformation) in
> > the output. What do I need to consider, add or change?
>
> Well, the rk.result function is not really designed to work well with
> multiple values per cell. But the problem is even more basic, here: The
> $statistic of the test is actually a vector of two values: tau and z. You
> can't put those into a single cell of the data.frame. Therefore you get a
> warning "number of items to replace is not a multiple of replacement
> length", and the z drops out.
>
> I suggest to do the following (inside the for-loop):
>
> try ({
> rk.temp.t <- bonett.test (...)
> rk.temp.results$'kurtosis estimator (tau)'[i] <-
> rk.temp.t$statistic["tau"] rk.temp.results$'transformation (z)'[i] <-
> rk.temp.t$statistic["z"] rk.temp.results$'p-value'[i] <- rk.temp.t$p.value
> })
>
> Note that storing the test in a temporary variable, and fetching the values
>
> >from there is better than calculating the test several times, as it is
> > both
>
> more efficient and easier to read.
>
> Regards
> Thomas
Great, nice. I adopted it and noticed that D'Agostino test was affect by this
too. Anyway, this issue is fixed. Thanks.
More to come ;)
Regards
Stefan
More information about the Rkward-devel
mailing list