Friday, April 22, 2011

"Death by PowerPoint"

Given all the presentation preparation going on this week, I thought some might appreciate (or get some comic releif) from this.   Drawing by The Hiking Artist.

- Yarko

Wednesday, April 20, 2011

Sample Size for Proportional Odds Models

Over the summer we needed to determine the sample size for a SNP-related grant where response is 0/1/2. Turns out Hmisc package in R has a function "popower". Here is the descripton:

"popower computes the power for a two-tailed two sample comparison of ordinal outcomes under the proportional odds ordinal logistic model. The power is the same as that of the Wilcoxon test but with ties handled properly. posamsize computes the total sample size needed to achieve a given power. Both functions compute the efficiency of the design compared with a design in which the response variable is continuous. print methods exist for both functions. Any of the input arguments may be vectors, in which case a vector of powers or sample sizes is returned. These functions use the methods of Whitehead (1993)."

Whitehead J (1993): Sample size calculations for ordered categorical data. Stat in Med 12:2257–

R in Action - discussion on Java Ranch

Some might find this useful (a discussion with author Rob Kabacoff):

R in Action's  author, Rob Kabacoff, also runs the site, Quick R referenced in Hacky's post:

Tuesday, April 19, 2011

Social Rejection Hurting? Pain Meds & Brain Activity

This is what I'd mentioned at lunch, but I am not at all surprised - teams, our striving for sense of belonging, punishment by banishment - these are all items related to our health, just as you would expect for social animals (i.e. it's always playing some real role).


Friday, April 1, 2011

R lmer: how to to extract fixed effects with p-values

coeffun = function(fit)
  vc <- vcov(fit, useScale = FALSE)
  b <- fixef(fit)
  se <- sqrt(diag(vc))
  z <- b / sqrt(diag(vc))
  P <- 2 * (1 - pnorm(abs(z)))
  return(cbind(b, se, z, P))

This assumes normality of estimated coefficients

Subscribe via email

Enter your email address:

Delivered by FeedBurner


google analytics