search for: ugroup

Displaying 5 results from an estimated 5 matches for "ugroup".

Did you mean: group
2008 Dec 28
1
Random coefficients model with a covariate: coxme function
...,1,0,0,1,0,0,1,0,1,0,0,0,1,1),2) centers<- rep(rep(1:32, 2),2) data1<-list(y, treat, covar, uncens, centers) names(data1)<- c("y", "treat", "covar", "uncens", "centers") data1<-as.data.frame(data1)[order(centers,treat),] library(kinship) ugroup<-paste(rep(1:32, each=2), rep(0:1, 32), sep='/') #unique groups mat1<-bdsmatrix(rep(c(1,1,1), 32), blocksize=rep(2,32), dimnames=list(ugroup, ugroup)) mat2<-bdsmatrix(rep(c(0,0,0,1), 32), blocksize=rep(2,32), dimnames=list(ugroup, ugroup)) group1<-paste(data1$centers, data1$tr...
2008 Mar 05
1
coxme - fitting random treatment effect nested within centre
Dear all, I am using "coxme" function in Kinship library to fit random treatment effect nested within centre. I got 3 treatments (0,1,2) and 3 centres. I used following commands, but got an error. > ugroup=paste(rep(1:3,each=3),rep(0:2,3),sep='/') > mat1=bdsmatrix(rep(c(1,1,1,1,1,1,1,1,1),3),blocksize=rep(3,3),dimnames=list(ugroup,ugroup)) > mat2=bdsmatrix(rep(c(0,0,0,0,0,0,0,0,1),3),blocksize=rep(3,3),dimnames=list(ugroup,ugroup)) > group=paste(dat1$centre,dat1$treat,sep='/'...
2001 Sep 14
1
rowsum dimnames (PR#1092)
...quot;,"X","Y")) [,1] [,2] [,3] [,4] 1 2 5 8 11 2 4 10 16 22 whereas S-Plus gives the more useful result: [,1] [,2] [,3] [,4] X 2 5 8 11 Y 4 10 16 22 This is because R's rowsum() code gives the first dimnames as "ugroup", which is a factor, rather than "as.character(ugroup)". Similarly for the assignment of names(x) in the case where x is a vector. I'm using R 1.3.0 on Solaris 2.6. Help says rowsum's author is Terry Therneau. Thanks! -- David Brahm (a215020@agate.fmr.com) Version: pl...
2001 Sep 13
1
rowsum dimnames
...quot;,"X","Y")) [,1] [,2] [,3] [,4] 1 2 5 8 11 2 4 10 16 22 whereas S-Plus gives the more useful result: [,1] [,2] [,3] [,4] X 2 5 8 11 Y 4 10 16 22 This is because R's rowsum() code gives the first dimnames as "ugroup", which is a factor, rather than "as.character(ugroup)". Is this a bug or a feature? I'm using R 1.3.0 on Solaris 2.6. Help says rowsum's author is Terry Therneau. Thanks! -- David Brahm (a215020 at agate.fmr.com) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
2008 Jul 14
1
Computing row means for sets of 2 columns
Is there a better or more efficent approach than this without the use of t() ? > (m <- matrix(1:40, ncol=4)) [,1] [,2] [,3] [,4] [1,] 1 11 21 31 [2,] 2 12 22 32 [3,] 3 13 23 33 [4,] 4 14 24 34 [5,] 5 15 25 35 [6,] 6 16 26 36 [7,] 7 17 27 37 [8,] 8 18 28 38 [9,] 9 19 29 39[10,] 10 20 30 40 >