My suggestion is that you provide a reproducible example, as the Posting Guide
requests.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Hi
>
> Dear R users
> I want change the entries in a matrix. I did a matrix
>
>
>
> A=0 1 5
>
> .3 0 0
>
> 0 .5 0
>
>
>
> A1<-A
>
>
> A2<-A*0.90
> A2
>
> 12 3
>
> 1 0.00 0.90 4.5
>
> 2 0.27 0.00 0.0
>
> 3 0.00 0.45 0.0
>
>
>
> I need replace elements one by one
I'm not too familiar with geese but it looks like the
summary(fit)$correlation would be a dataframe. Maybe try getting the
first (or whatever row you're interested in):
...
corr_gee<-summary(fit)$correlation[1,1]
se_corrgee<-summary(fit)$correlation[1,2]
est[i,]<-c(corr_gee, se_corrgee)
...
Scott
Hi there,
and how about this:
nsim<-500
est<-NULL
for(i in 1:nsim){
fit <- geese(x ~ trt, id=subject, data=data_gee, family=binomial,
corstr="exch", scale.fix=TRUE)
.
corr_gee<-summary(fit)$correlation[1]
se_corrgee<-summary(fit)$correlation[2]
est<-data.frame(rbind(est,cbind(corr_gee
4 matches
Mail list logo