Displaying 20 results from an estimated 500 matches similar to: "Package "demography" - calculating quintiles of survival probabilities"
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;
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
2013 Apr 06
1
Creating quintiles on monthly basis
Hi,
I am trying in R to indicate in which quintile a value of a variable is for
every month of my data frame in this case based on volatility. For each
month I want to know for each stock if it is in the most volatile quintile
of if it is in one of the others.
So far I have come up with the following function (see below).
Unfortunately, the function only works in some cases and often gives the
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 the matrix x after p1 and then deleting in a second step
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
2004 Oct 20
1
Drawing multiple line plots
Hi All:
Greetings, and best wishes from the festive times here at Kolkata, India -- the time of Durga Puja celebrations.
I seek your advice as I try plotting lines for my data. The problem:
I have created a dataframe that looks like this (name: myFrame):
lowest second third fourth highest significance
INAS 0.107 0.115 0.123 0.115 0.166 0.000
MMA 0.091 0.107 0.115
2016 Jul 11
2
Esperanza de vida librería 'demography'
Buenos días,
Necesito calcular la vida media de cada uno de nuestros modelos de producto pero tengo un histórico incompleto (para los productos más nuevos tengo la vida completa de las cohortes, pero para los más antiguos tengo sólo la parte final de la vida de las cohortes). He decidido calcular la esperanza de vida dinámica con un modelo actuarial, concretamente la librería 'demography'
2011 Mar 31
1
R packages "Demography installing Error In Ubuntu 10.04"
Dear lists:
I could not calculate what is wrong with my installing.
Could you help me to find the solution?
Thanks.
Following are the installing screen massages:
install.packages("demography")
将程序包安装入‘/home/zzk/R/i686-pc-linux-gnu-library/2.12’
(因为‘lib’没有被指定)
--- 在此連線階段时请选用CRAN的鏡子 ---
载入Tcl/Tk接口... 完成
also installing the dependencies ‘akima’, ‘rgl’, ‘misc3d’, ‘quadprog’, ‘zoo’, ‘locfit’,
2011 Apr 10
1
demography's lifetable: how to incoporate the parameter "franction of last age interval of life"
Dear list:
I have tried demography package in my Ubuntu(10.04). What I interested in was lifetable analysis. Chiang(1984)'s reference have been copied to steeper my learning curve. step by step, the example presented by the textbook also have been examined.
In the course I find that the paramter "fraction of last age intervl of life" could not be take as a option in the module
2012 Feb 12
3
Counting the loop-round of a "for"-loop
Dear all,
i have daily stock prices for more than 10 years and want to compute annual
volatilities for certain dates during this period. Since i have found no
"easy" way to work with time data, the data presents itself in the structure
TIme Index - Stock Price
1 - 15,6
2 - 17
...
...
2010 - 28
2011- 28,5
...
4500 - 23
Since I want to have the volatility only for certain dates, I
2017 Feb 15
2
stats::median
The generic stats::median method is defined as
median <- function (x, na.rm = FALSE) {UseMethod("median")}
I suggest that this should become
median <- function (x, na.rm = FALSE, ...) {UseMethod("median")}
This would allow additional S3 methods to be developed with additional
arguments.
Currently I have to over-ride this generic definition in the
demography
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
2011 Nov 07
2
How to do a target value search analogous to Excel Solver
Hi all,
i'm trying to find a solver possibility analogous to the Excel Solver in R.
Since i just started with R, I have only little knowledge. Can someone help
me by solving the problem?
I have the following 'starting position':
z = rnorm(1,0,1)
y <- function(x,z){2*x - 1 + z}
I am looking for a certain "x" in such a way that the result of the function
'y'
2010 Sep 07
2
Plotting longitudinal data
Hello,
Hope that someone could help me plotting longitudinal data below:
7213 3333330001 0.8300 13.05.09 1
1 3333330001 0.8700 09.02.05 NULL
4797 3333330001 0.7700 21.03.07 NULL
2399 3333330001 0.7800 12.04.06 NULL
2400 3333330002 NULL 27.03.06 NULL
7230 3333330002 0.8200 14.05.09 0
2 3333330002 0.8400 09.02.05 NULL
4798 3333330002 0.8700 20.03.07 0
4799 3333330003 0.9000 20.03.07 13
2401
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:
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) +
+
2007 Sep 27
1
Reading SAS SD2 Data file
I am trying to read a SAS dataset into R that is in a .SD2 format, which
is the Version 6 standard format from SAS.
I see the routines that read the SAS XPORT format (foreign, Hmisc), but
is there any way to read this one?
Any help would be greatly appreciated.
Corey Sparks
Corey Sparks
Assistant Professor
Department of Demography and Organization Studies
University of Texas-San Antonio
One UTSA
2011 Apr 03
1
problem in install RCurl in R (Ubuntu Linux)
I have some problem in running R-cran's Demography package.
The hmd.mx function need Rcurl. I tried to install RCurl, but meet the following error:
*********************************************************************
...
* installing *source* package ?RCurl? ...
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ?RCurl?
* removing
1999 Feb 02
1
Limits on smbclient -M?
Greetings-
We use smbclient -M to send a Message of the Day to clients every once in
a while. The clients are NT4 (SP3), and the server is Samba
1.9.19-prealpha. However, the same problem appears with version 2.0.0.
The issue is: once the file to be sent exceeds approximately 675 bytes
(smbclient reports sending 975 bytes, presumably including some overhead),
the message turns up blank on the
2011 Apr 17
1
How to retrieve a vector of a data.frame's variable attributes?
Hi,
I have a data.frame with 100 variables and I have assigned a "label",
"units" and "category" attribute to each variable. I would like to reorder
the variables in the data.frame by the "category" attributes but can't find
a way.
For example, the first variable is:
> attributes(hh$aez)
$levels
[1] "coastal" "forest"