similar to: Percentiles in R

Displaying 20 results from an estimated 100 matches similar to: "Percentiles in R"

2007 Apr 06
4
Computing the rank of a matrix.
Hi! Maybe this is a silly question, but I need the column rank (http://en.wikipedia.org/wiki/Rank_matrix) of a matrix and R function 'rank()' only gives me the ordering of the elements of my matrix. How can I compute the column rank of a matrix? Is there not an R equivalent to Matlab's 'rank()'? I've been browsing for a time now and I can't find anything, so any
2008 Sep 30
1
ordering problem
Hi there! I need some assistance here with vector orderings. I have a set of q vectors of length p, grouped by rows in a matrix A, q?p, that I need to order lexicographically (http://en.wikipedia.org/wiki/Lexicographical_order). I also have another matrix B, p?r, and a vector c, that should be ordered according to the order of A. So far, I was doing ordering <-
2008 Aug 28
3
Plots spanning columns
Hi! I want to plot three graphs (residuals, ACF and PACF of a model). Ideally I would use a c(2,2) disposition where the residuals plot would start at position 1,1 and span to position 1,2. Then I would plot the ACF in position 2,1 and the PACF in position 2,2. Maybe is clearer like this: -------------------------- | | | residuals | |
2008 Aug 15
2
Combination with repetition
Hi there! I can't find any information about creating combinations with repetitions in R. The function combn() does create combinations, but _without_ repetitions. Here is what I need to do: svIter <- 1000 xx <- matrix(rnorm(m*n), c(m, n)) sequence <- seq(range(xx)[1], range(xx)[2], length.out = svIter^(1/q)) expand.grid(secuence, secuence, .../q times/..., secuence) That is,
2007 Mar 26
5
Developer work cycle
Hi! I've been browsing through the last months' archive and I can't find an answer to my question, so here it is (let's hope it's not too obvious): I'm working on extensions of an R library, and I would be very surprised if everyone developing R packages is doing the following, as I do: 1.- Write down a modification of an R file 2.- Exit the current R
2007 Sep 07
2
Matlab's lsqnonlin
Hi! I'm translating some code from Matlab to R and I found a problem. I need to translate Matlab's function 'lsqnonlin' (http://www-ccs.ucsd.edu/matlab/toolbox/optim/lsqnonlin.html) into R, and at the beginning I thought it would be the same as R's 'optim'. But then I looked at the definition of 'lsqnonlin' and I don't quite see how to make
2007 Sep 27
1
A matrix multiplication
Dear all, I'm having trouble using the 'apply' function to multiply some arrays. Let A be a 500x2 array and B a 500x3 array. I need a vector C which has 6 columns being the first three the result of A[,1] * B and the second three the result of A[,2] * B. What is the most efficient way to express that? I'm trying to use 'apply' with no success... Thanks for your
2007 Sep 12
3
Passing parameters to 'optim' fn function
Hi again! I'm using the 'optim' method to fix the parameters of a model. I have written the function to be minimised and another function which returns the gradient of the error. Now my problem is that, in order to compute that gradient, it would be extremely convenient to be able to pass some parameters to the gradient function. I don't see how to do it given the fixed syntax
2008 Jan 04
1
Multi-dimensional function.
Hi there! Happy new year to everyone! There's a piece of code that I must write that's driving me crazy. Maybe any of you has previous experiences in something similar. Any help will be greatly appreciated! The problem is as follows. I have a matrix Z with dimensions c(m, p). I have two vectors Gamma and Th with length p. What I want to do is, for j in 1:p, for each pair
2019 Jan 16
2
optimizacion costos
Estimados. Hace un tiempo que tengo una duda, estaba pensando en los problemas como optimización de costos, donde hay varias alternativas y librerías, pasando por soluciones inspiradas en energía, genética o algo matemático como matrices y álgebra. Luego aparecen tensorflow, cntk, y otros tantos, de los cuáles https://keras.rstudio.com/ ofrece alternativas para mezclar los mundos por decirlo de
2019 Jan 16
2
optimizacion costos
Estimado Jesús Para Fernández En teoría es ese material, lo vi muy rápido y en la parte genética tiene cosas que biológicamente no son así, hay un libro de Falconer, Introducción a la genética cuantitativa, que tiene escrita la parte matemática, hay un abismo entre la biología y los ingenieros que se inspiran en la biología. Yo pensaba en la resolución de un problema real, aunque relativamente
2004 Mar 03
1
Calculating percentiles from Grouped Data (gapply)
Dear R-list, I try to calculate the 10- and 90-Percentile from grouped data. Using 'lappy' it works fine but I have no success with 'gapply': df <- data.frame(test = runif(100)) df <- df[order(df[,1]),] z <- rep(1:10, each = 10) lapply(split(df, z), function(x) quantile(x, probs=c(10,90)/100)) library(nlme) gapply(as.data.frame(df), which=1, function(x)
2004 Sep 01
1
AW: Looking for help in calculating percentiles
How do I calculate the 95th percentile when I know the 25th, the median and the 75th?? Thanks, Harmony Tenney [[alternative HTML version deleted]]
2004 Apr 26
2
Looking for help in calculating percentiles
Hi All: I am working with a dataset on Arsenic toxicity, and I am trying to calculate the 20th, 40th, 60th, 80th, and highest percentiles for a variable, dietary Moisture (variable name dMoist). The inbuilt function quantile(dMoist) would print 0, 25th, 50th, 75th, and 100th percentile. Does there exist a function that can calculate xth percentile (where x = 10th, 20th, ... etc) values?
2004 Apr 26
0
AW: Looking for help in calculating percentiles
Type e.g.: quantile(x,0.1) or Quantile(x,0.8) Which calculates the 10th and 80th quantile Matthias Templ -----Urspr??ngliche Nachricht----- Von: arinbasu at softhome.net [mailto:arinbasu at softhome.net] Gesendet: Montag, 26. April 2004 09:29 An: r-help at stat.math.ethz.ch Betreff: [R] Looking for help in calculating percentiles Hi All: I am working with a dataset on Arsenic toxicity,
2013 Jan 21
1
Percentiles with R for a big data.frame
Dear R users, I came up to a problem dealing with percentiles in R. >From my previous questions: I do have a big data.frame, with lots of columns and rows. The following command enables me to calculate means for all data frame. dat1$newID<-rep(1:(nrow(dat1)/12),each=12) #if nrow(dat1)/12 is integer dat2<-with(dat1,aggregate(cbind(dat1[,1:71]),by=list(newID),mean)) What I need is to
2005 Jan 07
2
Getting empirical percentiles for data
Dear List, I have some discrete data and want to calculate the percentiles and the percentile ranks for each of the unique scores. I can calculate the percentiles with quantile(). I know that "ecdf" can be used to calculate the empirical cumulative distribution. However, I don't know how to exact the cumulative probabilities for each unique element. The requirement is similar
2001 Nov 25
2
Boxplots using percentiles?
The standard R boxplot appears to use quartiles to determine the height of the rectangles and a range parameter - RNG - (default=1.5 I think) that determines the length of the whiskers as <= RNG x Interquartile Range. Is it possible to instead define the range as extending to the 95th percentile? If so, how would this be done? nb, I'm plotting multiple boxplots on a single chart so a
2004 Apr 14
2
zph / squid syntaxis ?
Hi, I''ve used old ZPH patch under squid 2.4 Stable4 and it works great ! Now I want to patch squid 2.4 stable 5, with new patch, on http://www.it-academy.bg/zph/ I''ve patched and installed squid 2.5 stable 5 succefully, but I can''t get ZPH works. I''m trying with ... $TC class add dev $LANDEV parent 1: classid 1:7 htb rate 1Mbit $TC filter add dev $LANDEV
2012 Apr 20
1
Package "demography" - calculating percentiles of survival probabilities distribution
Hi, I am using the package "demography" from Rob Hyndman for the Lee-Carter-Model. It is an amazing powerful tool but I am struggling with one issue: I want to compute different percentiles of the survival probability distribution derived from the Lee-Carter-Forecast (e.g. the 50%tile, 60%tile, 75%tile and 99%tile) for each of the next 10 years. Is there any possibility to retrieve