Displaying 1 result from an estimated 1 matches for "expproppool".
Did you mean:
expproppooled
2007 May 23
0
Replicated LR goodness-of-fit tests, heterogeneity G, with loglm?
...lengi =
tleng[as.integer(i)]
counti =
sum(obscounts[tran==i])
weightexp[[i]] =
expi*lengi*counti
weights[i] =
lengi*counti
}
sum = rep(0,
length(weightexp[[1]]))
for (i in
1:length(weightexp)) {
sum = sum +
weightexp[[i]]
}
expproppooled =
sum/sum(weights)
#Now the pooled G
obs =
tapply(obscounts,cov,sum)
exp =
expproppooled*sum(obs)
Gp =
2*sum(obs*log(obs/exp))
dfp = max(as.integer(levels(cov)))-1
probp = pchisq(Gp,
dfp, lower.tail=F)
#total G
Gt = sum(G)
dft =...