Displaying 20 results from an estimated 200 matches similar to: "Help with manipulation of svytotal output"
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
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
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;
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
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
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) +
+
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
2010 Aug 25
1
Surprising behaviour survey-package with missing values
Dear list,
I got some surprising results when using the svytotal routine from the
survey package with data containing missing values.
Some example code demonstrating the behaviour is included below.
I have a stratified sampling design where I want to estimate the total
income. In some strata some of the incomes are missing. I want to
ignore these missing incomes. I would have expected that
2006 Jul 07
2
Multistage Sampling
Dear WizaRds, dear Thomas,
First of all, I want to tell you how grateful I am for all your
support. I wish I will be able to help others along one day the same way
you do. Thank you so much. I am struggling with a multistage sampling
design:
library(survey)
multi3 <- data.frame(cluster=c(1,1,1,1 ,2,2,2, 3,3), id=c(1,2,3,4,
1,2,3, 1,2),
nl=c(4,4,4,4, 3,3,3, 2,2), Nl=c(100,100,100,100,
2008 Oct 22
1
Package survey
Hi,
I’m using the svyby for total statistics, for example:
svyby(~p_igov,~div_a,desenho_nps,svytotal,drop.empty.groups=TRUE,vartype
=c("se","var","cvpct"))
In the numerical variable p_igov (and others) I have many non responses
but if I maintain the NA it doesn’t work.
summary(base_nps$p_igov)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
2006 Feb 07
2
getting strata/cluster level values with survey package?
First, I appoligise for the rooky question, but...
I'm trying to obtain standard errors, confidence intervals, etc. from a
sample design and have been trouble getting the results for anything other
than the basic total or mean for the overall survey from the survey
package.
For example, using the following dataset,
strata,cluster,vol
A,1,18.58556192
A,1,12.55175443
A,1,21.65882438
2010 Dec 19
1
package survey
Hi R users,
could someone help me to find out which formulas, for standard error
calculation, are used in following example:
a=data.frame(weights=rep(c(10,1),c(4,1)),fpc=rep(41,5),uk=rep(1,5))
srs<-svydesign(id=~1, weights=~weights, data=a)
srs1<-svydesign(id=~1, weights=~weights,fpc=~fpc, data=a)
svytotal(~uk,srs)
total SE
uk 41 9
svytotal(~uk,srs1)
total SE
uk 41
2008 Aug 15
2
Design-consistent variance estimate
Dear List:
I am working to understand some differences between the results of the
svymean() function in the survey package and from code I have written
myself. The results from svymean() also agree with results I get from
SAS proc surveymeans, so, this suggests I am misunderstanding something.
I am never comfortable with "I did what the software" does mentality, so
I am working to
2002 Mar 18
0
SSH and root access from limited hosts
This is blanket access for root from any host with valid keys (and password)
- I want to limit that access to 4 hosts no matter what keys or passwords
are provided/used. I have looked at shosts.equiv but this doesn't stop
other hosts being allowed.
I have also looked at "AllowUsers root at host1 root at host2 ..." but this also
means including every user we have for all other
2007 May 18
1
svychisq
Dear All
I am trying to use svychisq with a two-dimensional table 4 x 5. The
command I am using is
summary(svytable(~dietperception+dietstatus,dudleyls1rake,na.rm=TRUE),"C
hisq")
It is throwing up an error message as follows:
Error in NCOL(y) : only 0's may be mixed with negative subscripts
In addition: Warning messages:
1: is.na() applied to non-(list or vector) in:
2007 Jul 06
0
svyglm
Dear Professor Lumley
I am relatively new to using R and also to logistic regression. We have
analysed our Dudley Health Survey using the survey package. I am now
trying to look at associations using svyglm but I am unsure of how to
interpret the output and present the resulting model or whether there
are any other things I should do to check the validity of the model.
Below is an example of
2011 Aug 28
4
How do I get a weighted frequency table?
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110828/d35f51a1/attachment.pl>
2006 Aug 21
1
"vcov" error in svyby and svytable functions
Hi,
I'm trying to compute survey svytable statistic on subsets by using the
svyby function.
Here is the code:
b<-svyby(~V024+V751, by=~V025, design=strat2, svytable, round=TRUE)
The vars, V024, V751 and V025 are factors. The by var has 2 levels, and
hence there will be two subsets. strat2 is created by the svydesign function.
It's giving me the following error:
>