search for: totvar

Displaying 4 results from an estimated 4 matches for "totvar".

2008 Aug 15
2
Design-consistent variance estimate
...data = mm) svymean(~score, gg, deff='replace', na.rm=TRUE) ### My code which replicates the formulae in the LaTeX code below ## Cluster totals xx <- with(mm, tapply(score, group, sum, na.rm=TRUE)) ## Mean of the total ss <- mean(xx, na.rm=T) ## get total variance k <- length(xx) totvar <- sum((xx-ss)^2) * k/(k-1) ## The SE is then N <- nrow(mm) sqrt(totvar/N^2) One additional thing to point out is this: ## sqrt of variance of the total is: > svytotal(~score, gg) total SE score -1.7923 21.139 ## sqrt of variance of total from my code > sqrt(totvar) [1] 2...
2006 Nov 24
2
low-variance warning in lmer
...ht place ...) thanks Ben Bolker self-contained but unnecessarily complicated simulation code/demonstration: --------------- library(lme4) library(lattice) simfun <- function(reefeff,ntreat=2,nreef=12, nreefpertreat=3, t.eff=10, totvar=25,seed=NA) { if (!is.na(seed)) set.seed(seed) ntot = nreef*nreefpertreat npertreat=ntot/ntreat reef = gl(nreef,nreefpertreat) treat = gl(ntreat,npertreat) r.sd = sqrt(totvar*reefeff) e.sd = sqrt(totvar*(1-reefeff)) y.det = ifelse(treat==1,0,t.eff) r.vals = rnorm(nreef,sd=r.sd)...
2005 May 23
1
Can't reproduce clusplot princomp results.
Dear R folk: Perhaps I'm just dense today, but I am having trouble reproducing the principal components plotted and summarized by clusplot. Here is a brief example using the pluton dataset. clusplot reports that the first two principal components explain 99.7% of the variability. But this is not what princomp is reporting. I would greatly appreciate any advice. With best regards, -- Tom
2004 Sep 02
3
confidence intervals
Dear R users; Im working with lme and Id like to have an idea of how can I get CI for the predictions made with the model. Im not a stats guy but, if Im not wrong, the CIs should be different if Im predicting a new data point or a new group. Ive been searching through the web and in help-lists with no luck. I know this topic had been asked before but without replies. Can anyone give an idea of