N versus Neff

1,125 views
Skip to first unread message

Joni Coleman

unread,
Nov 21, 2017, 12:22:59 PM11/21/17
to ldsc_users
Hi,

I have confused myself with what seems to be a simple question... When using case-control data for LDScore, which is the correct N to pass the program - N or Neff?

Looking at the code, I think it suggests N [Cases + Controls] is the default. 

However, this doesn't make sense to me, because it would treat a cohort with 20K cases and 100K controls the same as a cohort with 60K cases and 60K controls (i.e. both N = 120K).

Surely the balanced 60K cohort has more power? This would be reflected in Neff [4 / ((1/Cases) + (1/Controls)] - for the 2K/100K cohort, Neff =  66,667 , whereas for the 60K/60K cohort Neff = 120K.

I'm sure I'm probably missing something important about the maths of LDScore - could you clarify which to use?

Thank you,

Joni

Raymond Walters

unread,
Nov 21, 2017, 1:32:35 PM11/21/17
to Joni Coleman, ldsc_users
Hi Joni,

N=Cases+Controls is the desired value (though you can equivalently specify in terms of Neff, as shown below).

The differential power reflected by Neff actually gets captured by the ascertainment term of the observed/liability scale transformation. If we call the sampling proportion pi, then we can rearrange Neff as:

Neff = 4/[(1/pi*N)+1/((1-pi)*N)]
= 4/[(1/pi*N)+1/((1-pi)*N)] 
= 4/[(1-pi)/(pi*(1-pi)*N)+pi/(pi*(1-pi)*N)] 
= 4/[1/pi*(1-pi)*N]
= 4*pi*(1-pi)*N

For LDSC, the primary term of interest is N*h2/M, where that h2 is observed scale. Substituting for liability scale h2 gives:
N*[z^2/K(1-K)]*[P(1-P)/K(1-K)]*h2_liab/M

The N*P*(1-P) is the key factor here. For N=Cases+Controls, then P=pi, giving:
N*P*(1-P) = pi*(1-pi)*N

For Neff the important observation is that we’ve defined an N that now corresponds to P=.5. So in terms of Neff we get:
P*(1-P)*Neff = .5*(1-.5)*4*pi*(1-pi)*N = pi*(1-pi)*N

So using N=Cases+Controls and the appropriate --samp-prev should be equivalent to using Neff with  --samp-prev 0.5. (In practice they may not be literally identical when case/control balance varies by SNP, but I expect the difference should be minor.)

Cheers,
Raymond



--
You received this message because you are subscribed to the Google Groups "ldsc_users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ldsc_users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ldsc_users/9ee617c9-cbf9-45a3-9a79-372af32b6470%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joni Coleman

unread,
Nov 21, 2017, 1:53:50 PM11/21/17
to ldsc_users
Thanks for the swift reply, Raymond  - that both works perfectly with the results I've got and explains a lot! 
Reply all
Reply to author
Forward
0 new messages