search for: varvec

Displaying 3 results from an estimated 3 matches for "varvec".

2007 Sep 25
2
Need help with function writing
...lot comparing # the treatments' data is constructed. Output is a one-row # data frame reporting the results of the test and # confidence interval ################################################## trtvec=as.factor(trtvec) boxplot(split(yvec,trtvec)) title(header) ybar=tapply(yvec,trtvec,mean) varvec=tapply(yvec,trtvec,var) nvec=table(trtvec) error.df=nvec[1]+nvec[2]-2 pooled.var=((nvec[1]-1)*varvec[1]+(nvec[2]-1)*varvec[2])/error.df diff12estimate=ybar[1]-ybar[2] stderr=sqrt(pooled.var*((1/nvec[1])+(1/nvec[2]))) tratio=diff12estimate/stderr twosidedP=2*(1-pt(abs(tratio),error.df)) tcrit=qt(1-a...
2007 Sep 24
1
hypothesis testing
...plot comparing # the treatments' data is constructed. Output is a one-row # data frame reporting the results of the test and # confidence interval ################################################## trtvec=as.factor(trtvec) boxplot(split(yvec,trtvec)) title(header) ybar=tapply(yvec,trtvec,mean) varvec=tapply(yvec,trtvec,var) nvec=table(trtvec) error.df=nvec[1]+nvec[2]-2 pooled.var=((nvec[1]-1)*varvec[1]+(nvec[2]-1)*varvec[2])/error.df diff12estimate=ybar[1]-ybar[2] stderr=sqrt(pooled.var*((1/nvec[1])+(1/nvec[2]))) tratio=diff12estimate/stderr twosidedP=2*(1-pt(abs(tratio),error.df)) tcrit=qt(1-a...
2008 Apr 15
1
glm syntax question
...ts: Estimate Std. Error z value Pr(>|z|) (Intercept) -2.92995 0.08731 -33.558 < 2e-16 *** Var_1 1.39244 0.10979 12.683 < 2e-16 *** Var_2 0.86091 0.09650 8.922 < 2e-16 *** For (1) I would like some code analogous to the following (which doesn't work) VarVec <- c("Var_1","Var_2") out <- glm(Var_0~VarVec, family=binomial(link=logit), data=MyData) For (2) I would like to be able to access the table shown above (which is only part of what summary(out) displays). I'd like something like table <- summary(out) SigVars <-...