Displaying 20 results from an estimated 20000 matches similar to: "Sampling in R"
2004 Mar 01
6
How to plot Histogram with frequence overlaid by distribution curve
Hi,
I am facing the problem that I want to plot a histogram chart set
freq to true and overlay with normal or weibull or exponential distribution
curve.
The sample code is shown as below:
>samp<-c(-8.2262,-8.2262,-8.2262,-8.20209,-8.09294,-8.07321,-8.07321,
-8.07321,-8.07175,-8.04948,-8.04948,-8.04948,-8.03848,-8.03848,
2007 Jun 28
2
sampling question
I am interested in locating a script to implement a sampling scheme
that would basically make it more likely that a particular observation
is chosen based on a weight associated with the observation. I am
trying to select a sample of ~30 census blocks from each ZIP code area
based on the proportion of women in a ZCTA living in a particular
block. I want to make it more likely that a block will
2006 Apr 04
1
DISPLAYING A HISTOGRAM + finding NAs
I have a vector of values (about 8000 obs between 0 and 1). I want to
display a histogram as follows:
value of vector
( bw 0 and 1) |
|
|
|
|
|______________________________________
all 8000 obs.
So that each section of the x axis corresponds
2011 Dec 07
1
Rank samples by breaks in hist and assign result as factor
Hi R users,
My goal is to rank my samples according to how they fall out in a
histogram with 10 bins to produce a ranking for each sample according
to where it falls on the histogram, with a "1" to represent one tail
of the hist, a "10" to represent the other tail, and a "5" for the
median/mean. I have a number of different data sets to do this with
and in all cases
2012 Feb 06
2
histogram
With R and the hist function, is there a way to make a histogram in which
the y axis denotes propotion with respect to a separate sample dataset of
the same range instead of frequency?
[[alternative HTML version deleted]]
2009 May 28
2
Bug in base function sample ( ) (PR#13727)
Full_Name: Michael Chajewski
Version: 2.9.0
OS: Windows XP
Submission from: (NULL) (150.108.71.185)
I was programming a routine which kept reducing the array from which a random
sample was taken, resulting in a single number. I discovered that when R
attempts to sample from an object with only one number it does not
reproduce/report the number but instead chooses a random number between 1 and
2010 Nov 11
3
overlap histogram and density
Hi,
Does anybody encounter the same problem when we overlap histogram and density
that the density line seem to shift to the right a little bit?
If you do have the same problem, what should we do to correct that?
Thank you.
par(mar=c(4,4,2,1.2),oma=c(0,0,0,0))
hist(datobs,prob=TRUE, main ="Volume of a catchment from four
2008 May 09
7
histogram
Dear R-expert,
For histogram function, can we get the table of bin and frequency like in excel, together with the histogram?
Therefore, we can check the number of data included.
Thank you so much for your attention and help.
____________________________________________________________________________________
[[elided Yahoo spam]]
2006 Oct 19
4
Question about random sampling in R
Hi,
I looked up the help file on sample(), but didn't find the info I was
looking for.
When sample() is used to resample from a distribution, e.g., bootstrap, how
does it do it? Does it use an uniform distribution, e.g., runif(), or
something else? And, when the help file says:"sample(x) generates a random
permutation of the elements of x (or 1:x)", would I be correct if I
2007 May 02
2
how to reproduce the same sampled units?
Hi all,
Is it possible to generate the same sample number of times in R? In
SAS, using the option "seed" it is possible to reproduce exactly the
same sample. Is there any such feature in R which I can use?
For further clarity,
for (i in 1:2)
{
samp = sample(1:1000,100,replace = FALSE)
print(samp)
}
For the above simulation, is it possible to generate the same sampled
units
2002 May 13
3
Histograms rotated, side-by-side
Hi there,
I am wanting to create 8 side-by-side histograms which have been rotated 90
degrees clockwise from how they usually sit.. all with the same scales. Is
someone able to help me out?
Thanks so much,
Rachel Cunliffe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send
2006 Aug 25
1
How to get back POSIXct format after calculating with hist() results
Hi,
I have a casting/formatting question on hist.POSIXt:
The histogram plot from POSIXct works perfect (with help of Prof. Ripley
-thanks!).
When processing the hist(plot=FALSE) output and then plotting the
results over the x-axis (bins) coming from hist(), I lose the date/time
labels, getting instead integers displayed.
Trying to cast the $breaks with as.POSIXct gives silly results with
2007 Jul 16
3
R and Copula
hi,
first I want to say that I'm new here, and new with copula and R.
That is the reason why I'm writing, if somebody can help me.
I have to make an example of Copula.
On internet I've found this forum and that copula can calculate with R.
Can somebody help me with the thing how can I start and where can read about
these stuffs.
Thank to all who can help!
--
View this message
2007 Mar 12
2
Lmer Mcmc Summary and p values
Dear R users
I am trying to obtain p-values for (quasi)poisson lmer models, including
Markov-chain Monte Carlo sampling and the command summary.
>
> My problems is that p values derived from both these methods are
totally different. My question is
(1) there a bug in my code and
>
(2) How can I proceed, left with these uncertainties in the estimations of
> the p-values?
>
> Below
2008 Jun 23
5
Need ideas on how to show spikes in my data and how to code it in R
Hi
I have recently been analyzing birthweight data from a clinic. The
data has obvious defects in that there is digit preference on certain
weights making them overrepresented. This shows as spikes in the
histogram on certain well rounded weights like 2, 2.5, 3, etc. I
would like to show this to government officials but can't figure out
how I should present the finding in an easy to
2002 May 27
2
hist failed with unused arguments
Hello,
I urgently need a histogram of the vector geo1$ds1
but:
> hist(geo1$ds1)
Error in hist(geo1$ds1) : unused argument(s) ( ...)
I can use density, summary, boxplot and stem with this vector but not hist ?
Any suggestions ?
Thanks in advance,
Detlef Groth
> density(geo1$ds1)
Call:
density(x = geo1$ds1)
Data: geo1$ds1 (1412 obs.); Bandwidth 'bw' = 0.2805
2003 Mar 19
3
How would I analyse data like this?
Hello,
I'm a new R user and I'm having a little trouble getting started. I'm hoping
someone can help me out.
I have data that looks like this:
phone|state|code|amount|left|channel|time|mtd
15555551234|3|983|1000|266|IN|2003-03-16 23:57:21-05|C
15555552345|3|983|3000|0|IN|2003-03-16 23:58:16-05|C
15555552346|3|983|1000|40|IN|2003-03-16 23:58:24-05|C
Which I've read using scan().
2010 Oct 17
2
dpois().......bizarre warning messages
Dear Masters,
I have a question to submit
consider the following script
m<-4.95
obs<-rpois(36,m) # i generate 36 realization from a poisson(m)
hist(obs,freq=F)
curve(dpois(x,m),add=T,col="red") #i wish to overlay on the histogram the
theorical poisson density function
errors are returned saing the x vector doesn't contain integers....
really bizarre i can't give
2012 Feb 04
1
Making a point-sampling matrix
Dear all,
I would like to create a k,n matrix which that will include
- k random elements with value 1
-all rest zeros
-one single "1" in each row
- each column will have maximum one "1"
so far I have a so stupid function that with nested while tries to fit k numbers randomly in a row by row fashion, checking also if the c column rule is violated. In that case there is
2006 Jan 21
1
" 'x' must be numeric"
Hello all,
I am importing data from a txt file and try to get a histogram, I get the
message: "Error in hist: 'x' must be numeric".
When I use mode R returns "List".
However when I use srt I get:
`data.frame': 456 obs. of 1 variable:
$ V1: num 0.6344 0.4516 0.0968 0.7634 0.7957 ...
My file consists of one column only (no headers) and I can't figure out
why