similar to: devide data into decile

Displaying 20 results from an estimated 300 matches similar to: "devide data into decile"

2010 May 06
1
How to rank matrix data by deciles?
Hi R users, I have a matrix of data similar to: > y=matrix(rnorm(55),ncol=5) I would like to know to which decile each number belongs compared to the numbers in its column. Say y[1,1] is the third decile among y[1:11,1] and y[2,1] is in the second decile I would like get a matrix that would return their ranks in decile, i.e., y[1,1] -> 3 y[2,1] -> 2 Your help is much appreciated!
2007 Jul 10
1
exces return by mktcap decile for each year
I have a data frame, lets call it dat, with 3 columns ( mc, yr, ret) which represent market cap, year, and return. mc is a factor, mc, and ret are real numbers. I want to add a column to the data calculated as follows. For each year, I want to split the data by mc decile, then calculate the mean ret within that mc decile, and finally subtract that year's decile mean from the raw return. Then
2010 Jun 16
3
Decile
Hello comunity, I'm trying to find a similar function as decile of SPSS, NTILES (10) some of you know about that, I will appreciate your help in advance. In SPSS VARIABLES=Sales (A) /NTILES (10) /PRINT=NO for example if I have Next data input: case IdCust Sales Profit 1 265 140.81 314.31 2 266 1778.96 408.32 3 267 2663.66 820.85 4 268 2994.14 913.73 5 269 2185.58 686.64 6 271 105.21
2006 Nov 16
1
getting a title in a plot during an lapply
In my code below tempa and tempb are numeric vectors that I combined into a dataframe along with the deciles of tempa. I have an lapply statement that goes through the dataframe and does ten plots according to the appropriate decile. The code is below and it works fine. There are no bugs so I figure there was no need to include structure statements on the data. Also, I don't want to use coplot
2006 Mar 16
2
french secondary boxplot
bonjour, i'm a mathematic teacher and i have a question for R-developers : is it possible to have (in the future) a boxplot with whiskers from the first decile to the ninth decile, as usual in secondary french schools... by example : boxplot(serie,range=-1) for french boxplot ? cordialement, jean-pierre lyc?e jean zay orl?ans, france http://mathazay.free.fr/spip/
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
2005 Aug 03
2
using weighted.mean with tapply()
I am trying to calculate the weighted mean for a of 10 deciles and I get an error: > decile <- tapply(X=mat$trt1m, INDEX=mat$Rank, FUN=weighted.mean, w=mat$mcap) Error in FUN(X[[1]], ...) : 'x' and 'w' must have the same length All three of my inputs have the same length, as shown below, and the weighted.mean calculation works by itself, just not in tapply() >
2007 Oct 12
2
Plotting question
I am constructing plots ( regular not lattice ) and my initial command is par(mar=c(3,4,2,2), mfcol=c(5,2)) and then I create 10 plots on the page. It looks great but the plots on the page go in the order 1 6 2 7 3 8 4 9 5 10 Where the numbers denote decile breakdowns. Is there an easy way to make them go from left to right so 1 2 3 4 5 6 7 8 9 10 I could try
2006 May 01
4
efficiency in merging two data frames
I have two data sets about lots of companies' stock and fiscal data. One is monthly data with about 144,000 lines, and the other is quaterly with about 56,000. Each data set takes different company code. I need to merge these two together. I read both ask cvs. And the other file with corresponding firm code. Now I have three data sets. return$PERMNO, account$GVKEY. id is the data frames
2011 Nov 04
1
Decision tree model using rpart ( classification
Hi Experts, I am new to R, using decision tree model for getting segmentation rules. A) Using behavioural data (attributes defining customer behaviour, ( example balances, number of accounts etc.) 1. Clustering: Cluster behavioural data to suitable number of clusters 2. Decision Tree: Using rpart classification tree for generating rules for segmentation using cluster number(cluster id) as target
2005 Apr 21
2
Deciles and R
Hi everyone, I'm a new R user (if this is a really basic question, please do excuse me...) and I'm having some questions regarding a deciles problem. I have a variable which I need to categorize according to its deciles (X). However, this categorization should be made into another variable (call it NewVar). Ex. for the quartiles case (just for the sake of exposition, since I need
2006 Apr 02
2
Boxplot
bonjour, je voudrais savoir s'il serait possible de sugg?rer aux d?veloppeurs de R de proposer une option suppl?mentaire pour les moustaches, ? savoir les placer sur d1 et d9 comme c'est pr?conis? dans les programmes du secondaire en France, option du style boxplot (serie,range=91) par exemple... i would like to know if it is possible to have (with the agrement of developpers)
2012 Mar 14
1
How to use ggplot to do the binned quantile plots(one type of scatter plot)?
How to use ggplot to do the binned quantile plots(one type of scatter plot)? Hi all, I have done scatter plot: plot(x, y). Now I wanted to do binned quantile plots... can ggplot2 help me? For example, we bin x data into 10 bins. For each bin, we draw the 10 deciles of the corresponding y data in that bin as points/dots. And then accross all bins, we would like to connect the corresponding
2006 Apr 26
2
program and comment
Hi. I am a newbie to R. I need to do a courses projects with some manipulation lots of data record and some back-and-forth linear regression. I do not want to spend $100 for a SAS lincence, which professor used. So I decide to start to learn R to finish it. I am using R in Windows. I feel it is somehow works like mathemica. I try to write the work into a little program for future reference.
2012 Jul 09
1
boxplot with "cut"
Dear UseRs, I'm making box plots from a data set that looks like this: Chr Start End GeneDensity ReadCount_Explant ReadCount_Callus ReadCount_Regen 1 1 1 10000 107.82 1.243 1.047 1.496 2 1 10001 20000 202.50 0.835 0.869 0.456 3 1 20001 30000 158.80 1.813 1.529 1.131
2006 May 01
1
How to strip one term from a data.frame? + How to write long line in script?
I need to run a regression with 14 normal variables and 20 dummy variables. All the data is in a huge data.frame df. But there is some extra intermediate item in the same data.frame too. It will be nice I can strip off those terms and run lm(). Also, is there a simple way to write the formula, for example, just specify the y term, all other term in data.frame should be x_i. Or is there some
2004 Aug 03
1
Data manipulation query
Hi, Not sure if I am making a simple problem complex but still here we go: I have a data frame with four columns say, X1 X2 X3 and X4. I want to break X4 into deciles and for each deciles obtained, I want to see corresponding elements of X1. Ideally, the output should be in a tabular fashion as shown below: Deciles 1 Deciles 2 .... Deciles 10 X1-1 X1-2 X1-99 X1-5 X1-3 X1-10
2007 Nov 16
4
alternative to logistic regression
You can fit a linear probability model with glm and a bit of arm twisting. First, make your own copy of the binomial function: > dump('binomial', file='mybinom.R') Edit it to change the function name to "mybinom" (or anything else you like), and to add 'identity' to the list of okLinks. Source the file back in, and use mybiom('identity') to fit
2012 Oct 28
1
Tabular datos de Encuesta Continua de Hogares
Buenas, tengo la siguiente inquietud. Tengo un data frame con los microdatos de la ECH de mi pais. He realizado un cuadro sin problemas en excel pero me gustaria una rutina de R para poder generar la tabla. El data.frame se llama ECH2009. Cuenta con las siguientes variables para este caso: idhogar region estrato integranteshogar expansor ingpercapsvl Computador TvAbonado Internet 1 capital 1 2
2006 Apr 30
1
general help on R and factor in R and a few simple comment from a newbie
Hi. I am starting to learn R for a course project. I am relative OK c++ programer. I found the R is very different. I have read the "an introduction to R". I have to say it is not very newbie friendly. It does not explain many things clearly. And unfortunately, there is not too much introductory materials available on-line. I do not want to buy a book. For example, I found