Displaying 20 results from an estimated 300 matches similar to: "How to use Subpopulation data?"
2009 Sep 09
1
Combining simulated data
R helpers
Please help me combine the simulated data to a form of table where: Hypermarket have 10 rows, supermarket have 15 rows,......., spazashops with 35 rows.
Hypermarket <- rnorm(10, mean=20000, sd=7000)
Supermarket <- rnorm(15, mean=12000, sd=4000)
Minimarket <- rnorm(20, mean=10000, sd=4000)
Cornershop <- rnorm(20, mean= 8000, sd=3000)
Spazashop <- rnorm(35, mean=
2009 Sep 09
1
SRS Required sample size for simulated data
Hi
Out of curiosity, how can i determine the minimum required sample size of this data in a combined form say 100 entries which r functions can i use?
R helpers
Please help me combine the simulated data to a form of table where: Hypermarket have 10 rows, supermarket have 15 rows,......., spazashops with 35 rows.
Hypermarket <- rnorm(10, mean=20000, sd=7000)
Supermarket <-
2009 Sep 24
1
Fw: Re: Multiple Normal Curves
Sorry about the subject
--- On Thu, 24/9/09, KABELI MEFANE <kabelimefane@yahoo.co.uk> wrote:
From: KABELI MEFANE <kabelimefane@yahoo.co.uk>
Subject: Re: [R] Multiply Normal Curves
To: R-help@r-project.org
Date: Thursday, 24 September, 2009, 11:48 AM
R -helpers
i have been trying to do this problem without must success,i managed to do a graph for x, but it is not what i want to
2009 Sep 24
0
Fw: Simulating and Plotting
R -helpers
i have been trying to do this problem without must success,i managed to do a graph for x, but it is not what i want to define. I have also been able to do simple rendom sample. If possible can someone help here is the code for the graph pleae help
data.frame(ID=c(1,2,3),mu=c(10000,34000,50000),sigma=c(2000,3000,5000))
curve(dnorm(x,mean=parms$mu[1],sd=parms$sigma[1]),from=2000,
2009 Sep 28
0
Data analysis package for positively skewed data
R-helpers
A curious question: Can you make suggestions as to what to use in R for the data from a sample of the following:
Hypermarket <- matrix(rnorm(100, mean=50000, sd=5000))
Supermarket <- matrix(rnorm(400, mean=34000, sd=3000))
Minimarket <- matrix(rnorm(1000, mean=10000,sd=2000))
Cornershop <- matrix(rnorm(1500, mean=2500, sd=500))
Spazashop <- matrix(rnorm(2000,
2009 Sep 24
0
Multiply Normal Curves
R -helpers
i have been trying to do this problem without must success,i managed to do a graph for x, but it is not what i want to define,(i want to specify number of observations as well). I have also been able to do simple rendom sample.
data.frame(ID=c(1,2,3),mu=c(10000,34000,50000),sigma=c(2000,3000,5000))
curve(dnorm(x,mean=parms$mu[1],sd=parms$sigma[1]),from=2000,
to=80000,
2013 Apr 26
1
Stratified Random Sampling Proportional to Size
Hello R Experts,
I kindly request your assistance on figuring out how to get a stratified random sampling proportional to 100.
Below is my r code showing what I did and the error I'm getting with sampling::strata
# FIRST I summarized count of records by the two variables I want to use as strata
Library(RODBC)
library(sqldf)
library(sampling)
#After establishing connection I query the data
2009 Sep 09
3
Help on percentage of random numbers for different classes
R-list
I am sorry for asking this stupid question, but i have been running in circles. I want to randomly generate a scaling point of between 1 and 10, for say hundred entries, where the first 10% percent is has rates between 2 and 7, the next 15% 3 and 7, 20% between 3 and 9, 20% between 3 and 10, 35% between 5 and 10. The problem is that i can only generate the usual 100 using runif function
2002 Oct 15
0
Identification of heterogeneous subpopulation (MECOSA3)
Hi,
i read something about MECOSA3 (G.Arminger)
which is a software to :
"Analysis of finite mixtures of conditional Lisrel models"
I'm very interested to identify heterogeneous subpopulations and ask
me are similar functions doing something in R, too ???
I know SEM and perhaps with some additions/modifications it is possible
doing this general mean- and covariance structures with
2012 Feb 01
1
package sampling, function strata
Dear all,
I have to select 122 stratified random samples from a population of
>3900 cells. I have 41 strata and I have to draw a different number of
samples from them(between 2 and 8).
I have tried to apply the funtion strata following the instruction in
the manual:
strata(dataframe, stratanames=NULL, size, method=c("srswor"),
pik,description=TRUE)
but I get the error
2009 Sep 12
1
(no subject)
Dear All
I hope you can help me with this small problem. I want to draw a normal distribution line to this data:
p<-rnorm(100, mean=50000, sd=3000)
hist(p)
Kabeli
[[alternative HTML version deleted]]
2010 Feb 05
2
Random number quality
Hello,
I'm running R 2.10.1 on Windows Vista. I'm selecting a random sample of
several hundred items out of a larger population of several thousand. I
realize there is srswor() in package sampling for exactly this purpose, but
as far as I can tell it uses the native PRNG which may or may not be random
enough. Instead I used the random package which pulls random numbers from
random.org,
2009 Aug 25
1
Simulating data (stupid question)
Dear All
?
I know that you do not have to help me but please do, i am new to R as a CPI compiler, i just need to do a sample to see which sampling method best works in different situations, therefore since this is for practice purposes nobody will finance a real project thats why i need you to help me direct me as to how simulate data (just direct me,not 100% help). See my attachment for problem
2003 Feb 19
5
Subpopulations in Complex Surveys
Hi,
is there a way to analyze subpopulations (e.g. women over 50, those who
answered "yes" to a particular question) in a survey using Survey package?
Other packages (e.g. Stata, SUDAAN) do this with a subpopulation option to
identify the subpopulation for which the analysis shoud be done. I did not
see this option in the Survey package. Is there another way to do this?
2007 Mar 28
1
(no subject)
Hallo,
I'm trying to sample a matrix with simple random sampling without
replacement but seem to have a problem with the matrix length. Both
sample() and srswor() use length() which returns the number of columns in
matrix. This means that to function it seems that the sample size exceeds
the matrix length. I need to sample the whole matrix for there are
auxiliary variables I need for further
2008 Aug 25
1
How to run a model 1000 times, while saving coefficients each time?
Hello,
We have written a program (below) to model the effect of a covariate on
observed values of a response variable (using only 80% of the rows in
our dataframe) and then use that model to calculate predicted values for
the remaining 20% of the rows. Then, we compare the observed vs.
predicted values using a linear model and inspect that model's
coefficients and its R2 value.
We wish
2009 Sep 12
4
Normal distribution
Dear All
let me go one step further by asking you if you could help me show that the distribution of this data in normal. have a little idea (by trial and error) but i seem to not fully understand how its done.
H<-rnorm(100, mean=50000, sd=3000)
par(las=1)
hist(H, breaks=seq(40000, 60000, 1000), freq=F)
f<- function(x) exp(-(x-5000)^2/18000000)/sqrt(18000000*pi)
x<- seq(40000,
2009 May 27
1
Hierarchical glm with binomial family
Dear members of the R help list,
I want to do a hierarchical glm with binomial family but am unsure
about how to write the syntax which involves nesting.
I want to test whether the risk of being attacked by Herbivores for
Meadowsweet plants is significantly dependent on the Distance to
heterospecific source plants.
Dependent variable = Herbivory (yes/no)
Explanatory continuous variable =
2024 May 15
2
Extracting values from Surv function in survival package
OS X
R 4.3.3
Colleagues
I have created objects using the Surv function in the survival package:
> FIT.1
Call: survfit(formula = FORMULA1)
n events median 0.95LCL 0.95UCL
SUBDATA$ARM=1, SUBDATA[, EXP.STRAT]=0 18 13 345 156 NA
SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=1 13 5 NA 186 NA
SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=2 5
2017 Oct 19
2
Select part of character row name in a data frame
Thanks a lot, so simple so efficient!
I will study more the grep command I did not know.
Thanks!
Francesca Pancotto
> Il giorno 19 ott 2017, alle ore 12:12, Enrico Schumann <es at enricoschumann.net> ha scritto:
>
> df[grep("strat", row.names(df)), ]
[[alternative HTML version deleted]]