similar to: apply cut function on various values (factor constrained)

Displaying 20 results from an estimated 4000 matches similar to: "apply cut function on various values (factor constrained)"

2006 Sep 13
1
forcing levelplot to use relative cuts (ie cuts for each panel)
Dear guRus, I'm having trouble producing a levelplot with relative cuts for each panel (my data has large differences in scales, so I want to use quantiles for each panel). My attempts to change the 'at' argument in panel.levelplot function have not met with success. Below is a toy example. xy <- expand.grid(x = 1:3, y = 1:3) aaa <- rbind(cbind(xy, z = 1:9, site =
2011 Nov 22
1
Rcmdr numSummary: means of multiple variables without grouping
Hello there, when using the function numSummary in Rcmdr and selecting more than one variable (without grouping), the grand mean across all variables is returned for each variable instead of the mean of each single variable. However, this happens only for the mean, and not for sd, quantiles and na. This is the output: > numSummary(dataset1 [,c("var1", "var2")],
2012 Sep 27
3
problem with nls starting values
Hi I would like to fit a non-linear regression to the follwoing data: quantiles<-c(seq(.05,.95,0.05)) slopes<-c( 0.000000e+00, 1.622074e-04 , 3.103918e-03 , 2.169135e-03 , 9.585523e-04 ,1.412327e-03 , 4.288103e-05, -1.351171e-04 , 2.885810e-04 ,-4.574773e-04 , -2.368968e-03, -3.104634e-03, -5.833970e-03, -6.011945e-03, -7.737697e-03 , -8.203058e-03, -7.809603e-03, -6.623985e-03,
2006 Mar 23
1
Estimation of skewness from quantiles of near-normal distribution
I have summary statistics from many sets (10,000's) of near-normal continuous data. From previously generated QQplots of these data I can visually see that most of them are normal with a few which are not normal. I have the raw data for a few (700) of these sets. I have applied several tests of normality, skew, and kurtosis to these sets to see which test might yield a parameter which
2006 Apr 19
1
Hmisc + summarize + quantile: Why only quantiles for first variable in data frame?
Hi, I'm working on a data set that contains a couple of factors and a number of dependent variables. From all of these dependent variables I would like to calculate mean, standard deviation and quantiles. With the function FUN I get all the means and stdev that I want but quantiles are only calculated for the first of the dependent variables (column 8 in the summarize command). What do I
2013 Feb 19
3
Quantiles of a subset of data
bradleyd wrote > Excuse the request from an R novice! I have a data frame (DATA) that has > two numeric columns (YEAR and DAY) and 4000 rows. For each YEAR I need to > determine the 10% and 90% quantiles of DAY. I'm sure this is easy enough, > but I am a new to this. > >> quantile(DATA$DAY,c(0.1,0.9)) > 10% 90% > 12 29 > > But this is for the entire
2011 Jun 06
2
Wireframe, custom x-axis values
Hi, Im plotting some data with wireframe() like so: wireframe(result ~ u * r, myData, scales=list(arrows=FALSE)) However, I would really like to display something different for the displayed values of "u" rather than the actual values. This is because my u-values are a sequence of quantiles of myData, and I would like to display the quantiles used (e.g. "0.8 0.85 0.9
2008 Oct 20
4
aggregating along bins and bin-quantiles
Dear all, I would like to aggregate a data frame (consisting of 2 columns - one for the bins, say factors, and one for the values) along bins and quantiles within the bins. I have tried aggregate(data.frame$values, list(bin = data.frame $bin,Quantile=cut2(data.frame$bin,g=10)),sum) but then the quantiles apply to the population as a whole and not the individual bins. Upon this
2005 Jun 07
1
Function inside tapply
I'm new to R and not an experienced writer of programs, which may help explain my question. I wish to create a table or data frame which contains the quantiles of the columns in the data frame DF. I wish to produce a table T where T[1] shows me the quantiles of column DF[1] right up through the entirety of DF. Tried several approaches with limited success. This looked like the best
2010 Mar 08
1
Help with Hmisc, cut2, split and quantile
Hello, I have a set of data with two columns: "Target" and "Actual". A http://n4.nabble.com/file/n1584647/Sample_table.txt Sample_table.txt is attached but the data looks like this: Actual Target -0.125 0.016124906 0.135 0.120799865 ... ... ... ... I want to be able to break the data into tables based on quantiles in the "Target" column. I can see (using
2006 Mar 03
2
Compute quantiles with values and correspondent frequencies
Dear List, quantile(x) function allows to obtain specified quantiles of a vector of observations x. Is there an analogous function to compute quantiles in the case one have the vector of the observations x and the correspondent vector f of relative frequencies ? Thank you Paolo Radaelli [[alternative HTML version deleted]]
2017 Jul 23
1
BayesianTools update prior
Hi, Using the example in ?VSEM in the package BayesianTools I'm attempting to iteratively update the prior but find the plotTimeSeriesResults produces the following errors when I extend the VSEM example in BayesianTools. With the Code below (the errors) I get: " Error in quantile.default(x, probs = quantiles[i]) : missing values and NaN's not allowed if 'na.rm' is
2002 Jul 30
1
Some problems with installing a package under Windows
Hello! I've just installed R and I'm doing my first steps. I tried to install a package from a local zip.file. ------------------ > {pkg <- select.list(sort(.packages(all.available = TRUE))) + if(nchar(pkg)) library(pkg, character.only=TRUE)} > install.packages("C:/schacar/rw1051/RPgSQL.zip", .libPaths()[1], CRAN = NULL) updating HTML package descriptions
2007 Nov 30
2
Quantiles and QQ plots
I have 20 variables: 5,9,6,1,5,9,7,4,5,6,3,2,4,8,9,6,1,8,4,8 How do I calculate the corresponding quantiles from a normal distribution with the same mean and variance as the sample? Also, how do I draw a QQ plot of the data? Thanks for any help! -- View this message in context: http://www.nabble.com/Quantiles-and-QQ-plots-tf4925742.html#a14097909 Sent from the R help mailing list archive at
2003 Jun 11
1
qwilcox
The function 'wilcox.test' in R and S gives (almost) identical results (see below). 'qwilcox' however, does not: > qwilcox(p,5,5) p: 0.025 0.975 -------------------- R> 3 22 S> 18 37 I originally wanted to ask a questions, but then I found the answer. Given the confusion I run into, I wonder if this experience is worth reporting. The
2009 Mar 11
1
CI from svyquantile in survey package
I am having trouble understanding (i.e. getting) confidence intervals from the survey package. I am using R version 2.8.1 (2008-12-22) and survey package (3.11-2) on FC7 linux. To simplify my question I use an example from that package: R> data(api) R> dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc) R> (tst <- svyby(~api99, ~stype,
2010 Oct 20
1
Adding Legend about two quantile lines at ggplot
Hi, all. I'd like to add legend on my graph but I can't. My code is follows. library(ggplot2) score1<-rnorm(100,0,5) score2<-rnorm(400,10,15) mydata<-data.frame(score1,score2) ggplot(mydata,aes(y=score2,x=score1))+geom_point()+stat_quantile(quantiles=c(0.50),col="red")+stat_quantile(quantiles=c(0.90),col="blue",size=2) I like to add legend indicating the
2001 May 08
1
ks.test in ctest package (PR#934)
1. There is, I believe, some redundant code in the calculation of the test statistic in ks.test in the package ctest. Lines 34-37 of the code read x <- y(sort(x), ...) - (0:(n - 1))/n STATISTIC <- switch(alternative, two.sided = max(abs(c(x, x - 1/n))), greater = max(c(x, x - 1/n)), less = -min(c(x, x - 1/n))) Lines 35-37 could read
2012 Jul 14
1
Quantile Regression - Testing for Non-causalities in quantiles
Dear all, I am searching for a way to compute a test comparable to Chuang et al. ("Causality in Quantiles and Dynamic Stock Return-Volume Relations"). The aim of this test is to check wheter the coefficient of a quantile regression granger-causes Y in a quantile range. I have nearly computed everything but I am searching for an estimator of the density of the distribution at several
2007 Aug 28
2
quntile(table)?
Hi, I have data in the following form: index count -7 32 1 9382 2 2192 7 190 11 201 I'd like to get quantiles from the data. I thought about something like this: index <- c(-7, 1, 2, 7, 11) count <- c(32, 9382, 2192, 190, 201) quantile(rep(index, count)) It answers correctly, but I feel it's wasteful especially when count is