search for: gmean

Displaying 7 results from an estimated 7 matches for "gmean".

Did you mean: mean
2008 Oct 23
3
Fuctions help!
Hi everyone, I have a question about functions. I have two functions: Sampling=function(fname,Total,nSample,nPatient){......return(list(Gmean,Gsd))} Power=function(alfa,m1,m2,s1,s2,n1,n2){....return(powe)} I want to use "Gmean" and "Gsd" which are the returned values from "Sampling" function, in "Power" function. i.e. when I call "power" I want to be able to have something like: Power...
2008 Oct 17
2
function help
...s to sample and then returns the mean and standard deviation for each row in each sample. Sample=function(name, n){ res=replicate(n,name[,sample(colnames(name),n)],simplify=FALSE) Means=do.call(rbind,lapply(res,function(x) rowMeans(x))) rownames(Means)=paste('sample',1:n,sep="") Gmean=colMeans(Means) STDs=do.call(rbind,lapply(res,function(x) rowSds(x))) rownames(STDs)=paste('sample',1:5,sep="") Gsd=sd(STDs) return(Gmean,Gsd)} I then need to use the mean and standard deviation from each row to calculate the Power for 2 sample means. here is the function I use...
2008 Oct 22
2
Help with functions
...l,nSample,nPatient){ trans=t(A) colnames(trans) <- c(1:Total) result=replicate(nSample,trans[,sample(colnames(trans),nPatient)],simplify=FALSE) show(result) Means=do.call(rbind,lapply(result,function(x) rowMeans(x))) rownames(Means)=paste('sample',1:nSample,sep="") show(Means) Gmean=colMeans(Means) Gmean # load genefilter package STDs=do.call(rbind,lapply(result,function(x) rowSds(x))) rownames(STDs)=paste('sample',1:nSample,sep="") show(STDs) Gsd=sd(STDs) Gsd return(Gmean,Gsd)} -- View this message in context: http://www.nabble.com/Help-with-functions-tp2...
2005 Jul 25
2
how to get the group mean deviation data ?
> n=10;t=3 > d<-cbind(id=rep(1:n,each=t),y=rnorm(n*t),x=rnorm(n*t),z=rnorm(n*t)) > head(d) id y x z [1,] 1 -2.1725379 0.07629954 -0.3985258 [2,] 1 -1.2383038 -2.49667038 0.6966127 [3,] 1 -1.2642401 -0.50613307 0.4895856 [4,] 2 0.2171246 0.86711864 -0.6660036 [5,] 2 2.2765760 -0.48547142 -1.4496664 [6,] 2 0.5985345 -1.06427035 2.1761071
2005 Jun 23
0
how to reconstruct the discriminant funciton from lda$prior, $means and $scaling
...0.91111111 0.08888889 Group means: V1 V2 0 0.4445161 0.04723951 1 0.4058900 0.06934000 Coefficients of linear discriminants: LD1 V1 -30.24734 V2 12.56484 predict(z) only give me 11 errors. I used the following equations to reconstruct the discrimiat function: >gmean <- z$prior %*% z$means >const <- as.numeric(gmean %*% z$scaling) >slope <- -z$scaling[1]/z$scaling[2] >intercept <- const/z$scaling[2] >abline(intercept, slope) however, this line gives about 50 errors, not the same one used by the predict(z). Any suggestions? Thanks....
2006 Dec 11
2
updating rgl on debian stable
...h, Sepal.Width, Petal.Length, Petal.Width) ~ + Species, data=iris) > source("heplot.R") > source("heplot3d.R") > source("pairs.mlm.R") > heplot3d(iris.mod) Xlib: extension "XFree86-DRI" missing on display ":0.0". Error in ellipsoid(gmean, E, radius, col = last(col), label = "Error") : could not find function "asEuclidean" > > capabilities() jpeg png tcltk X11 http/ftp sockets libxml fifo TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE cledit ic...
2005 May 30
0
a question about read.marrayRaw
...rror in file(con, "r") : unable to open connection In addition: Warning message: cannot open file `C:/PROGRA~1/R/rw1091/library/marray/swirldata/81' > fnames <- as.vector(swirlTargets@maInfo[,1]) > swirl.raw <- read.marrayRaw(fnames, path = datadir, + name.Gf = "Gmean", name.Gb = "morphG", + name.Rf = "Rmean", name.Rb = "morphR", + layout = swirl.layout, + gnames = swirl.gnames, + targets = swirlTargets) Error in file(con, "r") : unable to open connection In addition: Warning message: cannot open file `C:/PROG...