PowerAndSampleSize.com

ted00

New Member
#1
So I'm starting a website (see thread title) devoted to statistical power analysis and sample size determination. Why? B/c I make power/sample size calculations all the time in my work. Sometimes a common statistical test will do; sometimes something a little more complex. But, invariably, the powers-that-be want me to give them numbers quick, and in rapid succession (try it with this value, no, now with this value ...) They also want my knowledge of all things power-sample-size to be rock solid.

I hear you. I know there's already a plethora of those online. But they've always turned out to be more of a headache to me than anything. Reason? They're all incomplete in one way or another -- underlying formula is unclear; too vague; limited inputs available; difficult to use; only does power or sample size, not both; etc...

As much as I love R -- and for me it is a better choice than the existing online calculators I've seen -- but all the packages I've seen still have similar issues as above. I considered writing up my own functions ... but if I code 'em in R, why not in javascript? Hence it began.

From my short time here it seems users of this site represent a wide range of statistical expertise/experience levels. I know what I need a power/sample size calculator to do, but that doesn't mean it's good for everybody. Keeping in mind it's a brand new site, any thoughts on the site? PowerAndSampleSize.com

I have a really cool system set up (details of which are probably more interesting for a computer science forum) so that I can add lots of calculators quickly; reason for that is, I plan to eventually have calculators for tons of statistical tests, any I'd ever conceivably need that I can code up to a webpage. I also intend to have enough clear articles there so that even I :p can remember the details of the calculations when need be, but I also want it to be accessible to a wide range of people, from a non-statistician graduate student, to a seasoned stat wrangler. Like it says on one of my pages, I (and we all) learn so much from the web, it'd be really cool to be able to help others, too.
 
Last edited:

Dason

Ambassador to the humans
#3
Why did you erase almost everything in your original post? That was pretty much the only reason I let it stay.
 

ted00

New Member
#6
that's a cool idea. there are several already that have power and sample size formulas, e.g. those here http://cran.r-project.org/web/views/ClinicalTrials.html

I am working with colleague on a package for something else, it will also have power for some esoteric tests

thing is, I'm a statistician, a statistician who's an R evangilist, and even I prefer a quick online calculator .... I often then go to R anyway so I can make cool graphs to help explain the situation :yup: ... but when first asked for power/sample size numbers they usually want it quick and something online is the quickest way

I know several non-statisticians who'd never touch R but still use online power calculators ... usually before calling me to see if they understand it correctly, but still, they go
 

ted00

New Member
#7
also, the site has R code, under each calculator
purpose is I know that's useful to me
i.e. pretty much what I said above:
online calc for quick number, R code I copy/paste into R to start making graphs
 

Dason

Ambassador to the humans
#8
But imagine how much easier it would be to make the graph if that code was packaged up into an easy to use function.

Heck you even have a function to make those graphs for you.
 

ted00

New Member
#9
this is true. maybe on my to-do list: the site carries an R package containing all the calculators

... i think i'm beginning to smell genius
 

spunky

Can't make spagetti
#10
I have to say i'm liking it very much as an alternative to that hideous GPower... but i'll need to wait until you add more regression-like techniques (multiple regression and logistic regression) and multivariate ones before I start recommending it.


and please, please, PLEASE turn this into an R package! :D

(and if you don't want to, at least always leave the R code somewhere else. "black-box" applets suck! :-/)
 
#11
I have to say i'm liking it very much...
Cool, thanks!

...add more regression-like techniques (multiple regression and logistic regression) and multivariate ones ...
will look into it, will do! Although, right now I've been sticking to the low-hanging fruit that doesn't require iterations, just closed-form stuff or stuff that has closed-form approximation, this is on my list now though

...please, please, PLEASE turn this into an R package! :D...
yep, that was a great idea!

...leave the R code somewhere else.
not sure what you're saying, do you mean other than in the code blocks under each calculator?

"black-box" applets suck! :-/)
Agreed!! +1
no java applets for me
when I'm doing these calcs in real life work, I need to look at the math formula and underlying code for myself ... all those on the site have the math formulas + R code + the calculator's code is javascript, so anyone can see it (view source in browser)
 

spunky

Can't make spagetti
#12
not sure what you're saying, do you mean other than in the code blocks under each calculator?
nah, I sort of meant to say as long as there is R code somewhere (like you have it at the end of each calculator) that's all that matters just to exactly, you know, *see* what you're doing. I sometimes feel sort of suspicious that some power analysis webapps could just be spitting runif() numbers or something.

I mean i'm not gonna be demanding or anything because you're offering this for free, but I was just mentioning that the regression stuff would be very useful.

I do a lot of work and teach a lot of students in social sciences (psychology, education, sociology, etc.) who are not particularly skilled at doing technical stuff so I liked your GUI-friendly approach for them, although I did realize they wouldn't be able to do much with it (yet) until more regression-like stuff appears.

now, every now and then we need to do power calculations for statistics that are more traditionally used in psychometrics (like coefficient alpha of reliability or so). *if* you wanted, at some point I could share the R code I have to do them so you can add them somewhere. it's very specialized stuff so you may not be interested in it, but i'm still putting it out there just in case :D
 
#14
...you're offering this for free...
yep, as in SAS<<R :yup:

now, every now and then we need to do power calculations for statistics that are more traditionally used in psychometrics (like coefficient alpha of reliability or so). *if* you wanted, at some point I could share the R code I have to do them so you can add them somewhere. it's very specialized stuff so you may not be interested in it, but i'm still putting it out there just in case :D
I'm very interested, and that's a very generous offer. We can cite you on the calculator's page if you want, cite as the contributor I mean, like at the top of the page on a blog or something, not just down below in the refs section (although can do that, too, if you wrote a paper on it)
 
Last edited:

Dason

Ambassador to the humans
#16
github isn't essential to using git but if you want to share code then it's a great way to do that. They have a decent intro (I suggest following the crash course link provided to learn more about git) https://help.github.com/articles/set-up-git

For the most part you can get by with knowing very little about git. Honestly the best way to learn it is by experience.

This is a nice little interactive tool you can use to learn some of the more advanced features: https://github.com/pcottle/learnGitBranching
 
#17
thanks for those, I'll be looking into it
not sure how long it's going to take to start making into R package, but we'll see
 
#18
I've been thinking about spunky's offer to contribute calculator code for the site. I like this idea of collaboration; I'm only one person and can only do so much, and only know so much. I've been thinking about the possibility of opening up the devlopment, not quite a wiki type of format, but maybe something similar and with more restrictions (I can't have random people on the internet submitting javascript, for example). Any ideas in this regard are much appreciated.

also, added 3 more calculators, odds ratio

also, have been looking at other R packages that are entirely devoted to PSS calculations, there are several. There are also packages that are devoted to something else but have PSS function included. And then there are functions in base packages, like power.t.test. I very much like the idea of an R package, right now I'm just trying to assess the need and how to organize it, what to include, what it can offer R users that other packages haven't already, etc.
 

Dason

Ambassador to the humans
#19
I've been thinking about spunky's offer to contribute calculator code for the site. I like this idea of collaboration; I'm only one person and can only do so much, and only know so much. I've been thinking about the possibility of opening up the devlopment, not quite a wiki type of format, but maybe something similar and with more restrictions (I can't have random people on the internet submitting javascript, for example).
github! It's the perfect tool for collaborating on code!