search for: weightexp

Displaying 1 result from an estimated 1 matches for "weightexp".

Did you mean: weighted
2007 May 23
0
Replicated LR goodness-of-fit tests, heterogeneity G, with loglm?
...xpi = expcounts[tran==i] G[i] = 2*sum((obsi*log(obsi/expi))) } dfs = rep(max(as.integer(levels(cov)))-1, max(as.integer(levels(cov)))) probs = pchisq(G, dfs, lower.tail=F) #and the lower tail probability of the G #get a weighted average for the pooled expectations weightexp = list() weights = vector() for (i in levels(tran)) { expi = expprop[tran==i] 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...