Hw7? question(1), is L(n|F.IS,p,c) likelihood a multinomial distribution (n.i1,n.i2,n.i3|P11,P12,P13), where P11/P12/P22 can be estimated from F.IS,q and c? I am not sure I understand the question right.
The likelihood, which I'll write in Bayesian-style notation as , can be written, using the law of total probability by conditioning and integrating over the unobserved , as
Here, I have dropped from the dependence quantities that are independent of the random variables, i.e. is dropped from the distribution of because once is known, is irrelevant and has been dropped from the distribution of because is a within-population property and are allele frequencies across populations (also see notes). was given explicitly in class. I'm just asking you to repeat it. And the other conditional probability is multinomial as you suggest.
Hw7? question (2), do I need the equation (2) to estimate F.IS.hat and c.hat? I mean will the data, if any, from lnL(n|F.IS,c) be used for estimation or use some other formula for estimation,like var(q)=cp(1-p).
Yes. Even if you use (to get , for example), you are going to need something, namely , to plug in for . You get by maximizing eq. (2). [Note because the distribution assumed for is truncated at 0 and 1.]
Let me just try to explain what is going on. See equation (1). It is the likelihood that you technically need to maximize over , , and in order to generate estimates of , , and (the latter two functions of the first three MLEs).
Unfortunately (1) is difficult to maximize, so eq. (2) makes some assumptions. It first assumes that the integral in (1) accumulates most of its volume at and near . Therefore, rather than computing the integral, it just substitutes in to the integrand and dispenses with the integral. Second, equation (2) also assumes that the likelihood in (1) which is a function sitting in 4-dimensional space above the space has a sharply peaked ridge above the plane defined by . In other words, for all possible values and , including at the special values and , equation (2) assumes that maximizes the likelihood.
Do I estimate 12 F.IS, one for each subpopulation?
This is a good question, because I failed to state an assumption:
Assume is constant across subpopulations. Please note, for a subpopulation with allele frequency
(from the notes, p. 3 of lec13). Rearrange:
is the expected proportion of A1A1 genotype in the subpopulation. In other words, is just the inbreeding we used before for single populations. Here, we are assuming the inbreeding within each subpopulation is the same.
> 2. similarly, would I have 12 F.is and c mle for each subpopln? (what's the R code for n! btw?)
is a parameter in the distribution of . There is one for each subpopulation, let's call them . In particular, relates to the variance in . It does not make sense to have a for each population, so there is only one .
(n! = factorial(n))
2. When use the optim to find F.is and c estimate, what's the supposed function?
You are trying to maximize the log likelihood of the data over the unknown parameters and . What is the likelihood? Parts (a) and (b) are all about obtaining a simplified version of the log likelihood, resulting finally in eq. (2).
You ask a numerical approach to get var(q), and I assume bootstrap is one strategy to get it. Again same question, since q = (q1,q2,...,…q12), how should I do the simulation then?
Bootstrap is for getting the variance on a statistic estimated from data. Here you are asked ONLY to get the MLEs. However, is a function of and . Specifically, this function involves the variance of a truncated normal distribution. If it wasn't truncated, the variance is just , and you would plug in (and ) for (and ). However, now you are asked to get the variance of this truncated normal distribution.
Now, suppose you didn't know the variance of some arbitrary distribution , but you could simulate from it. How would you estimatethe variance? Yes, a concept RELATED, but not the same thing as, thebootstrap enters here. ...
You simulate much data from g and then compute var. So, now the key question: Can you simulate data from the truncated normal?