similar to: draw random samples from empirical distribution

Displaying 20 results from an estimated 6000 matches similar to: "draw random samples from empirical distribution"

2005 Mar 18
6
Basic questions about RMySQL
Hello, Please forget me if I am asking something that is well documented. I have read documentation but there are points that are not clear for me. I am not expert in R nor Databases, but if someone direct me to a tutorial, I will appreciate it.. 1. In my understanding, I can install and use RMySQL withouth having to install MySQL in my PC, to have access to and to create new tables . Is this
2004 Dec 09
2
finding the most frequent row
I am bootstrapping using a function that I have defined. The "Statistic" of the function is an array of 10 numbers. Therefore if I use 1000 replications, the "t" matrix will have 1000 rows each of which is a bootstrap replicate of this 10 number array (10 columns). Is there any easy way in R to determine which row appears the most frequently? Thanks, Lisa Pappas Huntsman
2004 Sep 17
3
Removing constants from a data frame
Suppose I have x<-data.frame(v1=1:4, v2=c(2,4,NA,7), v3=rep(1,4), v4=LETTERS[1:4],v5=rep('Z',4)) or a much larger frame, and I wish to test for and remove the constant numeric columns. I made: is.constant<-function(x){identical(min(x),max(x))} and apply(x,2,is.constant) # Works for numerics x[,-which(apply(x,2,is.constant))] I'd really like to be able to
2004 Oct 04
4
Off-Topic: LaTeX package listings
Hola! I ask here since I learnt from this list that the LaTeX package listings should be good for typesetting R code. I encountered one problem: \begin{lstlisting} X %*% V \end{lstlisting} in the output the * in %*% disappears! same with %/%, etc, the / disappears. Any ideas? Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. --
2004 Dec 13
3
bootstrap package
Hello R'ers In previous versions of R (I now use 2.0.1) there was a package "bootstrap". I wrote some programs that depended heavily on this package but can unfortunately not find it on Cran today. Is there any way to find an older version of "bootstrap" and use it with the new version - 2.0.1? Sincerely Fredrik Lundgren Norrk??ping Sweden
2005 May 28
3
Incompatibility with VGAM
I just discovered that when the VGAM package (not on CRAN) is loaded, glm() doesn't work. This is because VGAM defines a family function() which gets found by glm() in place of the family function from stats. Then VGAM:::family returns an object which doesn't have a $family component, (it has a component $vfamily). I thought namespaces should protect us from this happening? Kjetil --
2004 Oct 29
1
as.list.matrix
I found the need of converting a matrix into a list of its columns (for use with do.call), and was surprised there was no method as.list.matrix, it could easily be a part of as.list default I wrote my.as.list.matrix <- function(mat) { if(!is.matrix(mat))stop("Argument must be a matrix") n <- NCOL(mat) res <- vector(mode="list", length=n)
2004 Dec 08
2
Strange error from R CMD INSTALL
I am trying to install a local package and get this unexpected error: ---------- Making package UMSA ------------ adding build stamp to DESCRIPTION installing R files installing data files installing man source files installing indices Error: couldn't find function "na.omit" Execution halted na.omit of course is in package stats, and that is listed in the Depends field in
2005 Mar 29
2
strange error with rw2010dev
With rw2010dev I get a strange protect(): protection stack overflow error with a small data frame which otherwise is usable: If anybody wants to have a look I can provide an RData file with the problematic data frame. Doesn't seem to be necessary, the following simulated example generates the error: > testmat <- matrix(1:80, 20,4) > dim(testmat) [1] 20 4 > str(testmat) int
2004 Dec 23
1
small problem with R CMD check
On trying with very smll test packages to try drilling down to som problems earlier reported in this list, I detected the following: R CMD check on a package with an R subdirectory empty, reports: * checking R files for syntax errors ... ERROR Syntax error in file On removing the empty subdirectory, the error disappears. Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of
2004 Sep 04
5
R question
Hi, Would you help me solve the following question? Thanks. Question: If I try to set the probability=0.05 and find the approximate x. (The answer should be somewhere between 2.1782 and 2.1783.) I write about this R program as follows but I don¡¦t know how to get the value of x which is between 2.1782 and 2.1783. library(mvtnorm) value<-array(1000) a<-array(1000)
2005 Mar 24
2
Bivariate lognormal distribution
Dear experts! Is there a package that enables to create the bivariate log-normal variables? Thanks a lot, Vicky Landsman. [[alternative HTML version deleted]]
2004 Dec 31
4
R-intro
Hello! I was reading R-intro and I have some suggestions: R-intro.html#A-sample-session rm(fm, fm1, lrf, x, dummy) suggestion rm(fm, fm1, lrf, x, y, w, dummy) The next section will look at data from the classical experiment of Michaelson and Morley to measure the speed of light. file.show("morley.tab") mm <- read.table("morley.tab") suggestion mm <- data(morley)
2004 Oct 06
4
How to get F Distribution values in R
i tried to use df(x,df1,df2) but the values arent the same when i looked it up in a F Distribution table.. How to get the same F Distribution values in R as in the f table?
2004 Oct 12
5
covariate selection?
Hello, I am hoping someone can help me with the following multivariate issue: I have a model consisting of about 50 covariates. I would like to reduce this to about 5 covariate for the reduced model by combining cofactors that are strongly correlated. Is there a package or function that would help me with this in R? I appreciate any suggestions. Thanks, Ian
2005 Jan 11
5
global objects not overwritten within function
Dear useRs, I have a function that creates several global objects with assign("obj",obj,.GlobalEnv), and which I need to run iteratively in another function. The code is similar to f <- function(...) { assign("obj",obj,.GlobalEnv) } fct <- function(...) { for (i in 1:1000) { ... f(...) ...obj... rm(obj) #code fails without this line } } I don't understand
2005 Sep 19
5
FDR analyses: minimum number of features
Dear List, We are planning a genotyping study to be analyzed using false discovery rates (FDRs) (See Storey and Tibshirani PNAS 2003; 100:9440-5). I am interested in learning if there is any consensus as to how many features (ie. how many P values) need to be studied before reasonably reliable FDRs can be derived. Does anyone know of a citation where this is discussed? Bill Dupont William D.
2005 Apr 30
2
Warning from Rcmd check - data could not find data set
This is rw2010 from CRAN. When running Rcmd check on a package I get: Warning in utils::data(list = al, envir = data_env) : data set 'vowel.test' not found Warning in utils::data(list = al, envir = data_env) : data set 'vowel.train' not found Warning in utils::data(list = al, envir = data_env) : data set 'waveform.test' not found Warning in utils::data(list
2005 Apr 30
2
Warning from Rcmd check - data could not find data set
This is rw2010 from CRAN. When running Rcmd check on a package I get: Warning in utils::data(list = al, envir = data_env) : data set 'vowel.test' not found Warning in utils::data(list = al, envir = data_env) : data set 'vowel.train' not found Warning in utils::data(list = al, envir = data_env) : data set 'waveform.test' not found Warning in utils::data(list
2005 Mar 22
3
mixtures as outcome variables
Dear R-users, I have an outcome variable and I'm unsure about how to treat it. Any advice? I have spending data for each county in the state of California (N=58). Each county has been allocated money to spend on any one of the following four categories: A, B, C, and D. Each county may spend the money in any way they see fit. This also means that the county need not spend all the money that