badger comments on "Ask for help on your project" open thread - Less Wrong

9 Post author: Emile 06 February 2012 09:59PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (44)

You are viewing a single comment's thread. Show more comments above.

Comment author: gwern 06 February 2012 11:07:05PM 3 points [-]

For the last 30+ days, I've been randomly taking vitamin D before bed and recording sleep data with Zeo as well as my best guess whether it was D or placebo: http://www.gwern.net/Zeo#vitamin-d

But I'm going to finish within the next <10 days, and then it's time for analysis. I would like to do a real statistical analysis, like a 'one-tailed T test', on the ZQ and components like length of REM sleep, but I don't actually know how - I've never used the standard statistical programs or packages like R. (Yes, yes, I know, I should learn real statistics. I haven't yet, though.)

My needs aren't too complex, I'm just asking whether the vitamin D did anything (bad), so maybe there is an easy to use online tool or something which would handle it?

Comment author: badger 07 February 2012 01:47:29AM 4 points [-]

If you have prior programming experience, R is simple for basic analysis. I don't know of any online tools. The following would be close to sufficient for what you seem to want:

mydata <- read.table("c:/sleepdata.csv", header=TRUE, sep=",") # Read in data w/ variable names in header
fit <- lm(ZQ ~ guess + placebo, data=mydata) # Compute linear regression
summary(fit) # Get estimated coefficients with t-statistics and p-values

For cookbook code, see Quick R. If you do use R, the RStudio IDE is very useful.

Comment author: gwern 07 February 2012 05:52:21PM *  2 points [-]

I really only know Haskell, but to my surprise, R wasn't too hard to work with. I didn't go with your linear regression code but just some straight t-tests on the variables of interest. I worked the averages and p-values into the text, and put the full R session output into 2 footnotes:

Comment author: gwern 14 February 2012 04:45:19PM 0 points [-]

I've finished my experiment; if you want to check my R interpreter usage, I put it in the footnotes in http://www.gwern.net/Zeo#vitamin-d-analysis