[rkward-devel] power analysis plugin
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Tue Oct 7 11:43:33 UTC 2014
Hi Meik,
On Sunday 05 October 2014 16:01:27 meik michalke wrote:
> sure, why not. would someone jump in to do write the help file? ;-)
trying to write a help file sometimes helps to spot non-intuitive controls, or
ones that could be simplified. Oh, and of course bugs...:
- For the two sample tests, when estimating the size of one of the samples,
why not always make it the second sample (i.e. first sample size provided)?
- Syntax error for estimating sample size in different sample sizes proportion
test.
- In some cases, you get the not-so-helpful error message:
Error in uniroot(function(n2) eval(p.body) - power, c(2 + 1e-10, 1e+07)) :
f() values at end points not of opposite sign
e.g. when no finite n2 sample size is enough to satisfy the given n1 sample
size, effect size, power, significance level. I am not sure, whether this
applies in all cases, but where it does, it would be good to print a more
helpful message. That might mean
pwr.result <- try (pwr.whatever(...))
if (class (pwr.result) == "try-error") {
rk.print ("Power anaylsis not possible at the given specification")
return () # Exits local(), so no need to put the rest inside an else{}.
}
- For GLM, would it make sense to allow to specify "number of parameters to
estimate", and "sample size (N)", instead of numerator / denominator df?
- In the generated printout() code, things might get slightly simpler, if you
print the header earlier:
# Prepare printout
rk.header(pwr.result[["method"]], parameters= c (list("Target
measure"="Whatever"), pwr.result["alternative"]))
note <- pwr.result[["note"]]
pwr.result[c("method", "note", "alternative")] <- NULL
rk.results(as.data.frame (unlist (pwr.result)), titles=c ("",
"Parameters"))
if(!is.null(note)){
rk.print(paste("<strong>Note:</strong> ", note))
}
[...]
- That said, I wonder, whether the following printout would be good enough
(after the rk.header()):
rk.print.literal (capture.output (print (x)))
(we could add a new function "rk.print.simple(x)" for this kind of output. It
would probably make sense in other places, too).
Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20141007/02fa1a4b/attachment.sig>
More information about the Rkward-devel
mailing list