search for: calclat

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

Did you mean: calclate
2017 Oct 20
1
create a loop
...n1, c("group"), summarise, N = length(group), mean = mean(temp, na.rm=TRUE), sd = sd(temp), se = sd / sqrt(N), variance=sd^2 ) #merge two datasets (dat1 and dat2) Rep1<-merge(Summary.Rep1, dat2, by="group") #calclate adjusted mean. variance Rep1$adj.mean<-(Rep1$total.pop*Rep1$mean)/sum(Rep1$total.pop) Rep1$adj.var<-(Rep1$variance)/(Rep1$sampled.pop/(1-(Rep1$sampled.pop/Rep1$ total.pop))) Rep1$over.adj.var<-(Rep1$total.pop/sum(Rep1$total.pop))^2*Rep1$adj.var Rep1$total<-Rep1$adj.mean*(Rep1$tota...