[R] memisc/mtable: show only estimates (one line)

Frederik Elwert frederik.elwert at rub.de
Sat Aug 29 21:30:54 CEST 2009


Hello!

mtable from memisc package shows estimates and standard error by
default. I wanted to show only the estimates. Therefore, I created a new
template:

setCoefTemplate(simple=c(est="($est:#)($p:*)"))

But this leads to the following error when used:

> mtable(berk0,berk1,berk2, coef.style="simple")
Error in dim(ans) <- newdims : 
  dims [product 1] do not match the length of object [2]

Did I make a mistake? Or is it not possible to show only estimates (or,
rather, have only one element in a template) with memisc?

Thanks,
Frederik



---- 8<----

library(memisc)

# Models from mtable example
berkeley <- aggregate(Table(Admit,Freq)~.,data=UCBAdmissions)

berk0 <- glm(cbind(Admitted,Rejected)~1,data=berkeley,family="binomial")
berk1 <-
glm(cbind(Admitted,Rejected)~Gender,data=berkeley,family="binomial")
berk2 <- glm(cbind(Admitted,Rejected)~Gender
+Dept,data=berkeley,family="binomial")

# Create one-line style
setCoefTemplate(simple=c(est="($est:#)($p:*)"))

mtable(berk0,berk1,berk2, coef.style="simple")

---->8----




More information about the R-help mailing list