search for: nyearpercycle

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

2011 Apr 28
1
Coding design with repeated measurements in the survey package
...confirm that it is either correct or wrong? I've added the lmer() equivalent that I want to replicate with svyglm(). Since the number of sites in the population is limited, I'll need to use the finite population correction. Thanks in advance. Thierry #create a small design nCycle <- 3 nYearPerCycle <- 3 nSitePerYear <- 5 Design <- expand.grid(SiteInYear = seq_len(nSitePerYear), YearInCycle = seq_len(nYearPerCycle), Cycle = seq_len(nCycle)) Design$Year <- (Design$Cycle - 1)*nYearPerCycle + Design$YearInCycle Design$Site <- Design$SiteInYear + (Design$YearInCycle - 1) * nSitePerY...