Displaying 20 results from an estimated 21 matches for "quintiles".
Did you mean:
quantiles
2010 Apr 07
0
Help with manipulation of svytotal output
I have some output from a survey shown below and would like to insert
total rows for each category to then be able to use it as a data set for
further analysis. Is it possible to do this in R. In this example I
would like to insert a row between rows 5 and 6, 10 and 11, 15 and 16,
20 and 21 and put in the sum of the rows 1-5, 6-10, 11-15, 16-20 and to
delete row 21 which has NA in it. I would
2012 Apr 20
1
Package "demography" - calculating quintiles of survival probabilities
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 quintiles for the cumulative survival
probability derived from the Lee-Carter-Forecast (e.g. the 50%-quintile,
75%-quintile and 99%-quintile) for the next 10 years. *
I am sure the package possess this functionality but I didn't find any way
to calculate quintile values.
Hope you can help me!
Than...
2009 Jan 19
1
conditional weighted quintiles
Dear All,
I am economist and working on poverty / income inequality. I need descriptive
statitics like the ratio of education expentitures between different income
quintiles where each household has a different weight. After a bit of
google search I found 'Hmisc' and 'quantreg' libraries for weighted quantiles.
The problem is that these packages give me only weighted quintiles; but what
I need is conditional weighted quintiles. The below example illust...
2011 May 08
2
help with mysql and R: partitioning by quintile
Hi,
I have a mysql table with fields userid,track,frequency e.g
u1,1,10
u1,2,100
u1,3,110
u1,4,200
u1,5,120
u1,6,130
.
u2,1,23
.
.
where "frequency" is the number of times a music track is played by a
"userid"
I need to turn my 'frequency' table into a rating table (it's for a
recommender system). So, for each user, I need to categorise the frequency
of tracks
2013 Apr 06
1
Creating quintiles on monthly basis
...works in some cases and often gives the
following error:
Error in cut.default(df$VOLATILITY, unique(breaks), label = FALSE, na.rm
=TRUE):
invalid number of intervals
Could you give me some advice on how to improve this code so that it works
properly.
It's relatively urgent. Many thanks!
quintilesVolByMonth <- function(x){
months<-as.vector(unique(x$DATE))
dfx<-data.frame()
for(n in seq(1,length(months))){
num<-5
print(paste("Appending month",months[n],sep=""))
df<-subset(x,DATE==months[n])
breaks<-quantile(df$VOLATILITY,pr...
2011 Nov 18
1
R: writing data from one matrix into another with keeping NA's
Hi,
I am looking to build even quintiles for a set of data. I managed to get it
done, but I would like to know if there is a more direct way to write the
data from my loop output x in the bottom of the code into the "empty" matrix
p1, which I filled with NA''s. The way I am doing it at the moment is, more
or less adding...
2004 Oct 20
1
Drawing multiple line plots
...115 0.123 0.115 0.166 0.000
MMA 0.091 0.107 0.115 0.142 0.179 0.000
DMA 0.126 0.103 0.126 0.129 0.142 0.031
The numbers in the dataframe indicate values of a continuous variable INMET (indicating ratio of inorganic arsenic vesus methylated arsenic species) for the respective quintiles of variables INAS, MMA, and DMA; "lowest" through "highest" indicate quintile levels of INAS,
MMA, and DMA. INAS, MMA, and DMA are discrete ordinal variables (factors, each variable has following levels: lowest, ..., highest). Significance indicates significance levels.
>F...
2010 Sep 07
2
Plotting longitudinal data
...ot against the fourth which is the date.
First I 'aggregate' the patient_ids:
id<-unique(dat$patient_id)
Then I try (and fail) to create a loop, that is supposed to plot the data:
for(i in 1:8480){patient_id==id[i]plot(date,value)}
What might be wrong?
And how could I only plot eg quintiles for the ones that go down fastest?
Thanks,
Jukka
2007 Mar 12
1
replicating SAS's "proc rank" procedure
Hello-
I wonder if there's a way to replicate SAS rank procedure where it ranks a
variable by a certain number of groups. For example, it's very easy to
calculate quintile rank in SAS, but I couldn't find the similar function in
R.
Does anyone know how to do this?
Thanks.
--
View this message in context:
2012 May 10
0
Coloring subsets of points of a strip chart by quantiles
Hello All,
I am trying to color five subsets of points in a series of vertical strip
charts by quintiles using the quantile function, but I have not been able to
do this successfully, nor have I been able to find an example of this
online. I would like to have the "E1", "E2", and "E3" columns plotted on a
single plot (containing the three strip charts). I am overlaying...
2013 Mar 26
2
GAM model with interactions between continuous variables and factors
Hi all,
I am not sure how to handle interactions with categorical predictors in the
GAM models. For example what is the different between these bellow two
models. Tests are indicating that they are different but their predictions
are essentially the same.
Thanks a bunch,
> gam.1 <- gam(mortality.under.2~ maternal_age_c+ I(maternal_age_c^2)+
+ s(birth_year,by=wealth) +
+
2020 Nov 12
1
Propensity Score Matching
...culo he leído que el PSM se puede utilizar como un elemento de clasificación y por tanto de homogeneización.
Mi intención es aplicar el PSM a un análisis de supervivencia. En este sentido mi hipótesis es que una variable ?x? tanto en su versión cuantitativa como categorizada a terciles,cuartiles o quintiles influye sobre la supervivencia de los sujetos. Esto entiendo que puedo resolverlo con un análisis de supervivencia y posteriormente con una regresión de Cox. Este método seria valido desde el punto de vista estadístico si bien desde el punto de vista biológico podría tener alguna duda de interpreta...
2020 Nov 10
0
Help propensity score
...culo he leído que el PSM se puede utilizar como un elemento de clasificación y por tanto de homogeneización.
Mi intención es aplicar el PSM a un análisis de supervivencia. En este sentido mi hipótesis es que una variable ?x? tanto en su versión cuantitativa como categorizada a terciles,cuartiles o quintiles influye sobre la supervivencia de los sujetos. Esto entiendo que puedo resolverlo con un análisis de supervivencia y posteriormente con una regresión de Cox. Este método seria valido desde el punto de vista estadístico si bien desde el punto de vista biológico podría tener alguna duda de interpreta...
2005 Jul 12
0
transition matrix and discretized data
...two-comun data frame. column 1 is the period-one individuals' earnings and column two is the period-two.
n <- nrow(X) #12000
sim <- runif(n, -.0001, .0001)
X <- X + sim
q <- 10 # in order to compute deciles. it could be quintiles, quartiles, whatever
p <- seq(0,1,1/q)
f.x <- quantile(X[,1], p, names=F)
f.y <- quantile(X[,2], p, names=F)
f.x[1] <- 0; f.y[1] <- 0
a <- cut(X[,1], f.x, right=T)
b <- cut(X[,2], f.y, right=T)...
2009 Apr 16
0
points geodata {geoR}
I used points graphic (geoR) in this way:
points(zn,pt.divide=c("quintiles"),
main="Location map of Zn",lambda=1,col="gray",yl="coord y",xl="coord x",x.leg=0.
3, y.leg=5.5,dig.leg=2,cex.min=0.5,cex.max=1,)
Can I reduce legend characters
(a sort of cex)?
2009 Oct 20
1
Dummy variables or factors?
Dear R-people,
I am analyzing epidemiological data using GLMM using the lmer package. I usually explore the assumption of linearity of continuous variables in the logit of the outcome by creating 4 categories of the variable, performing a bivariate logistic regression, and then plotting the coefficients of each category against their mid points. That gives me a pretty good idea about the
2008 Aug 02
1
problem with nested loop for regression
Hi everyone,
I'm experiencing difficulty getting the results I want when I use a nested
for loop. I have a data set to which I perform some calculations, and then
try to apply a regression over a rolling window. The code runs, but the
regression results I am getting (intercept and slope) are simply the same,
repeated again and again in the results matrix. The regression does not seem
to be
2006 Mar 23
1
AIX 5.1 rsync large file
Hello,
I have inherited a setup where there are 2 AIX 5.1 systems in 2 separate
sites. There are large database files that are backed from each site to
the other via rsync. Currently, it is using rsync version 2.5.4. It does
it via ssh with the options -avz. This has all been merrily plodding along
for some time. There is one file that is over 45 GB, and it started having
trouble with that
2003 Sep 25
1
Diamond graphs, again.
Some time ago I was allowed to discuss "Diamond Graphs", and whether
they would be useful in R, in this mailing list.
The August 2003 issue of The American Statistician has finally arrived
here and I have been able to read the article. A number of points of
interest arise.
1. The article is
"A Diamond-Shaped Equiponderant Graphical Display of the
Effects of Two
2010 May 26
3
error "variable names are limited to 256 bytes" when sourcing code
I've written a function that takes some input data output from a
simulation model and creates some graphs. It's not very complicated
code, and it works perfectly fine if I just run the code as is.
But I have converted it into a function so we call it externally, and
when I try to source the code to test the function, I get the error
message "variable names are limited to 256