similar to: Geometric mean of rows in matrix

Displaying 20 results from an estimated 800 matches similar to: "Geometric mean of rows in matrix"

2009 Aug 21
4
help with median for each row
Hi, I tried looking through google search on whether there's a way to computer the median for each row of a nxn matrix and return the medians for each row for further computation. And also if the number of columns in the matrix are even, how could I specify which median to use? Thank you very much! -- Edward Chen [[alternative HTML version deleted]]
2007 Sep 03
2
The quadprog package
Hi everybody, I'm using Windows XP Prof, R 2.5.1 and a Pentium 4 Processor. Now, I want to solve a quadratic optimization program (Portfolio Selection) with the quadprog package I want to minimize (\omega'%*%\Sigma%*%\omega) Subject to (1) \iota' %*% \omega = 1 (full investment) (2) R'%*%\omega = \mu (predefined expectation value) (3) \omega \ge 0 (no short sales). Where
2004 Dec 12
2
Help : generating correlation matrix with a particular structure
Hi, I would like to generate a correlation matrix with a particular structure. For example, a 3n x 3n matrix : A_(nxn) aI_(nxn) bI_(nxn) aI_(nxn) A_(nxn) cI_(nxn) aI_(nxn) cI_(nxn) A_(nxn) where - A_(nxn) is a *specified* symmetric, positive definite nxn matrix. - I_(nxn) is an identity matrix of order n - a, b, c are (any) real numbers Many attempts have been unsuccessful because a
2009 Feb 11
4
Efficent way to create an nxn upper triangular matrix of one's
The code below create an nxn upper triangular matrix of one's. I'm stuck on finding a more efficient vectorized way - Thanks. --Dale n <- 9 data <- matrix(data=NA, nrow=n, ncol=n) data for (i in 1:n) { data[,i] <- c(rep(1,i), rep(0,n-i)) } data
2014 Nov 13
1
metafor - code for analysing geometric means
?Dear All I have some data expressed in geometric means and 95% confidence intervals. Can I code them in metafor as: rma(m1i=geometric mean 1, m2i=geometric mean 2, sd1i=geometric mean 1 CI /3.92, sd2i=geometric mean 2 CI/3.92.......etc, measure="MD") All of the studies use geometric means. Thanks! Edward ---------------------------- [[alternative HTML version deleted]]
2005 Jan 04
1
quantiles for geometric distribution
Dear list, I have got an array with observational values t and I would like to fit a geometric distribution to it. As I understand the geometric distribution, there is only one parameter, the probability p. I estimated it by 1/mean(t). Now I plotted the estimated density function by plot(ecdf(t),do.points=FALSE,col.h="blue"); and I would like to add the geometric distribution. This
2008 Mar 16
1
R code for the MLE of a geometric distribution
Does anyone know how to approach R code for the MLE of a geom. distribution? thanks! [[alternative HTML version deleted]]
2011 Nov 16
0
Maximum likelihood for censored geometric distribution
Hi all, I need to check for a difference between treatment groups in the parameter of the geometric distribution, but with a cut-off (i.e. right censored). In my experiment I stimulated animals to see whether I got a response, and stopped stimulating if the animal responded OR if I had stimulated 10 times. Since the response could only be to a stimulation, the distribution of response times
2023 Oct 17
2
Fwd: r-stats: Geometric Distribution
---------- Forwarded message --------- From: Sahil Sharma <sahilsharmahimalaya at gmail.com> Date: Tue, Oct 17, 2023 at 12:10?PM Subject: r-stats: Geometric Distribution To: <do-use-Contact-address at r-project.org> Hey I want to raise one issue in *r-stats **geometric distribution * function. I have found the dgeom(x,p) which denotes probability density function of geometric
2024 Jan 26
0
Use of geometric mean .. in good data analysis
Sorry to prolong a thread on something that is clearly off topic, but when Michael Meyer wrote >by using the geometric mean all asymptotic results no longer apply. that is flat our wrong. It's true that the geometric mean converges to something different that E[X], but it does indeed have an asymptotic distribution and one that makes sense in some contexts. There is no reason that
2012 May 02
0
Robust estimation of a geometric random variable
Hi, I have a bunch of data which is assumed to be instances of a geometric random variable with outliers. How can I do a robust estimation of the parameter p so that the effect of outliers is minimized? As a part of the estimation process, I also need to know which are the outliers in the data. I found glmrob which does robust estimation of Poisson and binomial random variables but not geometric
2008 Feb 28
0
New Package: geozoo. High-Dimensional Geometric Objects
Dear useRs, I'd like to announce a new package called geozoo, short for geometric zoo. It's a compilation of functions to produce high-dimensional geometric objects, including hypercubes and hyperspheres, Boy's surface, the hyper torus and a selection of polytopes. For a complete list, as well as images and movies, visit
2011 Jan 15
2
median by geometric mean
Hi All, I need to calculate the median for even number of data points.However instead of calculating the arithmetic mean of the two middle values,I need to calculate their geometric mean. Though I can code this in R, possibly in a few lines, but wondering if there is already some built in function. Can somebody give a hint? Thanks in advance [[alternative HTML version deleted]]
2024 Jan 22
1
Use of geometric mean for geochemical concentrations
better posted on r-sig-ecology? -- or maybe even stack exchange? Cheers, Bert On Mon, Jan 22, 2024 at 7:45?AM Rich Shepard <rshepard at appl-ecosys.com> wrote: > A statistical question, not specific to R. > > I'm asking for a pointer for a source of definitive descriptions of what > types of data are best summarized by the arithmetic, geometric, and > harmonic >
2010 May 23
4
creating a reverse geometric sequence
Hello, Can anyone think of a non-iterative way to generate a decreasing geometric sequence in R? For example, for a hypothetical function dg, I would like: > dg(20) [1] 20 10 5 2 1 where I am using integer division by 2 to get each subsequent value in the sequence. There is of course: dg <- function(x) { res <- integer() while(x >= 1) { res <- c(res, x) x
1998 Nov 13
1
compute geometric mean
Hi: I need to compute the geometric mean of a population. How i can do it?? thanks. Jorge M. A. Magalhae -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request
2012 Jun 28
1
An extreme quantile of the geometric distribution
Hi, With R version 2.10.0 (2009-10-26) on Windows, I computed the p=1.e-20 quantile of the geometric distribution with parameter prob=0.1. > qgeom(1.e-20,0.1) [1] -1 But this is not possible, since X=0,1,2,... I guess that this might be a bug in the quantile function, which should use the log1p function, instead of the naive formula. Am I correct ? Best regards, Micha?l
2024 Jan 24
0
Use of geometric mean .. in good data analysis
By the Strong Law of Large Numbers applied to log(X) the geometric mean of X_1,...,X_n > 0 and IID like X converges toexp(E[log(X)]] which, by Jensen's inequality, is always? <= E[X] and is strictly less than E[X] except in trivial extreme cases. In short: by using the geometric mean all asymptotic results no longer apply. Michael Meyer [[alternative HTML version deleted]]
2010 Nov 10
2
Performing a geometric seqeunce using iterators?
I want to make a function for geometric seqeunce since testing=function(x){i=1;ans=1;while(true){ans=ans+(1/x)^i ; i=i+1} ;return(ans)} doesn't work... the program is freeze... from my research, i know i should use iterators. I read iterators.pdf at http://cran.r-project.org/web/packages/iterators/iterators.pdf and didnt find it helps solving my problem at all... Is there any sources I
2006 Jul 04
5
removing for loop
Dear Rusers, Trying to reduce my for loops addiction, could somebody tell me if there are ways to simplify (and perhaps accelerate ?) the following line for (i in 1:N) for (j in 1:N) m[i,j] = b[i]-b[j]; (where m is a NxN matrix and b a vector of length N) Thanks for any hint.