similar to: random number generation

Displaying 20 results from an estimated 1000 matches similar to: "random number generation"

2003 Feb 17
2
Graphing
I think this may be a histogram, but I'm not sure. Can anyone tell me how to replicate this graph in R? http://www.ginworks.com/images/multitot.gif Thanks, Joshua Gramlich
2003 Feb 17
1
R environment advice?
Hello, My questions are meant to be not necessarily specific...I am looking for advice and best practices for setting up an R environment. Here's my situation: I am one of perhaps three or four individuals who will be analyzing the same data through the use of R. I would like to set up a "base" environment for our project, basically some scripts that connect to a database, load
2003 Feb 14
2
function editing?
Is there a way to edit user defined functions once they've been created? For instance, I've a simple function that plots a table, but I'd like to go back and add more parameters to the barplot call. Is there a way to change this function without completely starting from scratch? Other than storing the code in a file and re-running it? Joshua Gramlich Piocon Technologies Chicago,
2003 Feb 13
1
pie charts?
I don't suppose it's possible to create a pie chart in R? I've got 1500 some odd elements in a frame that are valued at either -1, 0 or 1 and I'd like to find a reasonable way to represent the distribution graphically...any ideas? Joshua Gramlich Piocon Technologies Chicago, IL
2003 Feb 11
4
postgres
Is anyone using R with postgres? I'd like to do so, but cannot seem to find any reasonable explanation of how to do so. Joshua Gramlich Chicago, IL
2009 Aug 31
4
Offtopic, HT vs. HH in coin flips
Dear R-help, Could someone please try to explain this paradox to me? What is more likely to show up first in a string of coin tosses, "Heads then Tails", or "Heads then Heads"? ##generate 2500 strings of random coin flips ht <- replicate(2500, paste(sample(c("H", "T"), 100, replace = TRUE), collapse =
2010 Oct 13
2
Coin Toss Simulation
I am trying a simple toin coss simulation, of say 200 coin tosses. The idea is to have a data frame like so: Experiment# Number_Of_Heads 1 104 2 96 3 101 So I do: d <-data.frame(exp_num=c(1,2,3)); /* Just 3 experiments to begin with */ d$head_ct <-sum(sample(0:1,200,repl=TRUE)); d; exp_num head_ct 1
2016 Dec 18
0
llvm (the middle-end) is getting slower, December edition
On Dec 17, 2016 7:41 PM, "Sean Silva" <chisophugis at gmail.com> wrote: On Sat, Dec 17, 2016 at 6:32 PM, Davide Italiano via llvm-dev < llvm-dev at lists.llvm.org> wrote: > On Sat, Dec 17, 2016 at 1:35 PM, Davide Italiano <davide at freebsd.org> > wrote: > [...] > > > I don't have an infrastructure to measure the runtime performance > >
2007 Oct 15
2
Need some help
Hi! I'm taking a course that requires some programming background, but I'm a complete novice in the field. when asked to generate a list of 20 uniform random numbers, is it alright if I put in >randu, and just copy-paste the first 20 numbers?? Or is there, as I suspect, a better way of calling out exactly 20 uniform random numbers?? I'm also unable to solve the following problem:
2003 Oct 27
3
expanding factor with NA
I have a factor (with "n" observations and "k" levels), with only "nobs" < n of the observations not missing. I would like to produce a (n x k) model matrix with treatment contrasts for this factor, with rows of NAs placeholding the missing observations. If I use model.matrix() I get back a (nobs x k) matrix. Is there an easy way to get the (n x k) without
2006 Mar 18
0
No subject
One quirk to be watched is the use of connections to the DBMS via the Unix sockets vs ports. The PostgreSQL driver bundled with unixODBC will use Unix sockets to `localhost', but this driver seems unreliable (see the ChangeLog). The current driver will only use a TCP/IP port, and to use that needs postmaster started with the -i flag (which is not the default) and with tcp/ip
2002 Aug 29
8
lme() with known level-one variances
Greetings, I have a meta-analysis problem in which I have fixed effects regression coefficients (and estimated standard errors) from identical models fit to different data sets. I would like to use these results to create pooled estimated regression coefficients and estimated standard errors for these pooled coefficients. In particular, I would like to estimate the model \beta_{i} = \mu +
2012 Aug 04
3
Head or Tails game
Hi, Reading about a "Heads and Tails" game in http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/amsbook.mac.pdf Introduction to Probability (Example 1.4, pp. 5-8). You toss a coin 40 times. If heads, Peter wins $1, tails, he loses $1. I think I can do that ok with: winnings <- sum(sample(c(-1,1), 40, replace=TRUE)) But I have to do it 10,000 times
2004 Jan 30
1
Measures of central tendency - mode
Greetings, This seems too rudimentary to ask but for the life of me I cannot locate a readily easy method to compute the univariate mode. I know "mode" is not correct and "table" provides a reasonable count but I figured there would be an easy way to extract the value from the table after I do something like: max(table(mydadat$myvar)) unfortunately it only returns the max
2003 Jun 19
2
Fitting particular repeated measures model with lme()
Hello, I have a simulated data structure in which students are nested within teachers, and with each student are associated two test scores. There are 20 classrooms and 25 students per classroom, for a total of 500 students and two scores per student. Here are the first 10 lines of my dataframe "d": studid tchid Y time 1 1 1 -1.0833222 0 2 1 1
2003 Mar 05
8
how to find the location of the first TRUE of a logical vector
without having to check the vector element by element? Thanks a lot! Jason ===== Jason G. Liao, Ph.D. Division of Biometrics University of Medicine and Dentistry of New Jersey 335 George Street, Suite 2200 New Brunswick, NJ 08903-2688 phone (732) 235-8611, fax (732) 235-9777 http://www.geocities.com/jg_liao
2000 Sep 25
1
No subject
Dear friends. In Carlin and Louis "Bayes and emperical Bayes methods.." 1996 the classical example of 12 independent tosses of a fair coin producing 9 heads and 3 tails is given. If the situation is seen as a fixed sample of 12, a binomial lieklihood is used, and Carlin et al reports a probability of 0.075. Using sum(dbinom(9:12,12,.5)) I obtain 0.073 Likewise, if the experiment is
2003 Jul 11
1
three short questions
Hi all; This is my first message to the list, and I've got three "basic" questions: How could I insert comments in a file with commands to be used as source in R? Is it possible to quickly display a window with all the colors available in colors()? How? I'm displaying points, but they overlap, wether points() uses triangles, bullets or whatever. Is it possible to change
2003 Jun 25
2
within group variance of the coeficients in LME
Dear listers, I can't find the variance or se of the coefficients in a multilevel model using lme. I want to calculate a Chi square test statistics for the variability of the coefficients across levels. I have a simple 2-level problem, where I want to check weather a certain covariate varies across level 2 units. Pinheiro Bates suggest just looking at the intervals or doing a rather
2003 Jan 03
3
Packages w/ S4 classes in C?
Hello ... Does anyone know of a package (or other code) out there which has handled S4 classes in C? I realize that a lot of this stuff is fairly new in R-devel, so my assumption is no - but there seems to be some deviation from the green book that is really throwing me off, and I'm looking for some sort of front-to-back example. Thanks -Jeff