similar to: random sampling problems?

Displaying 20 results from an estimated 7000 matches similar to: "random sampling problems?"

2006 Apr 13
2
a question on subset a dataset
Dear R-users, I generate a dataset "d", and want to get a subset from it. ** *z<-rnorm(9) coords<-cbind(x=c(1,1,1,2,2,2,3,3,3),y=c(1,2,3,1,2,3,1,2,3)) d<-SpatialPointsDataFrame(coords, data.frame (z=z[1:9]))* The result*/dataset* is coordinates z 1 (1, 1) 1.41173570 2 (1, 2) 0.18546503 3 (1, 3) -0.04369144 4 (2, 1) -0.21591338 5 (2, 2)
2006 Mar 21
1
Getting polygons from contiguous grid cells having same value in sp
I have been using the sp package to deal with gridded data. I would like to know how to extract the vertices (x,y) of polygons that outline areas of like-valued cells in a grid. Here is a simple 3x3 grid: 2 2 1 1 2 1 1 1 3 x <- c(1,1,1,2,2,2,3,3,3) # define a 3 x 3 array of points y <- c(1,2,3,1,2,3,1,2,3) h <- SpatialPoints(cbind(x,y)) # make these an sp object of the points
2006 Aug 03
2
fitting a model with the nlme package
Dear all, I am analyzing some data that requires a mixed model. I have been reading Pinheiro and Bates' book, but cannot find the notation to fit the following model: Suppose I have the dataset below. Here I am fitting variable p as a fixed effect, variable h as a random effect and variable t as nested within h. I would like to include the variable j as well as an independent (non-nested)
2012 Sep 17
6
help with calculation from dataframe with multiple entries per sample
Hi  I have a dataframe similar to: >Sample<-c(1,1,1,2,2,2,3,3,3) >Time<-c(1,2,3,1,2,3,1,2,3) >Mass<-c(3,3.1,3.4,4,4.3,4.4,3,3.2,3.5) >mydata<-as.data.frame(cbind(Sample,Time,Mass))   Sample Time Mass 1      1    1  3.0 2      1    2  3.1 3      1    3  3.4 4      2    1  4.0 5      2    2  4.3 6      2    3  4.4 7      3    1  3.0 8      3    2  3.2 9      3    3
2009 Jul 31
2
merging two data frame with colomns of different length
Dear all, I am trying to merge two data frames based on a common column but for this common column both data frame do not have the same length and associated information. I checked previous exemples in the list but was not able to apply them in my case... Is someone know how to do that? Below is my code with the expected result: # data frame 1 Id1 <- c(1,1,1,2,2,2,3,3,3) Habit1 <-
2008 Jan 26
2
scatterplot3d with categorical data
Dear users, I'm trying to produce a 3d bar plot but the x and y dimensions have categorical data -- so I only want 3 points on each axis. So I try: require(scatterplot3d) mymat<-data.frame( x=c(1,1,1,2,2,2,3,3,3), y=c(1,2,3,1,2,3,1,2,3), z=c(1,2,3,4,5,6,7,8,9)) scatterplot3d(mymat, type="h", lwd=5, pch=" ", xlab="xlabel",
2008 May 14
4
Accessing items in a list of lists
Using R 2.6.2, say I have the following list of lists, "comb": data1 <- list(a = 1, b = 2, c = 3) data2 <- list(a = 4, b = 5, c = 6) data3 <- list(a = 3, b = 6, c = 9) comb <- list(data1 = data1, data2 = data2, data3 = data3) So that all names for the lowest level list are common. How can I most efficiently access all of the sublist items "a" indexed by the outer
2010 Aug 03
2
Collinearity in Moderated Multiple Regression
Dear all, I have one dependent variable y and two independent variables x1 and x2 which I would like to use to explain y. x1 and x2 are design factors in an experiment and are not correlated with each other. For example assume that: x1 <- rbind(1,1,1,2,2,2,3,3,3) x2 <- rbind(1,2,3,1,2,3,1,2,3) cor(x1,x2) The problem is that I do not only want to analyze the effect of x1 and x2 on y but
2006 Jul 06
2
questions on data management
Dear friends, suppose i have two datasets: A and B A: id<-1:6 x<-c(1,2,3,4,5,6) y<-c(2,4,6,8,3,2) xy<-data.frame(id,x,y) B m<-c(1,1,3,3,5,5) n<-c(2,2,6,6,3,3) mn<-data.frame(m,n) Now, i want to perfomr two tasks: 1. get a subset of B,no duplicate values,: C: m n 1 2 3 6 5 3 2.Extract the values in A on the conditions that x=m and y=n the results should be: id x y 1 1 2 3
2005 Jun 16
1
Survey - Cluster Sampling
Dear WizaRds, I am struggling to compute correctly a cluster sampling design. I want to do one stage clustering with different parametric changes: Let M be the total number of clusters in the population, and m the number sampled. Let N be the total of elements in the population and n the number sampled. y are the values sampled. This is my example data: clus1 <-
2008 Nov 18
2
[LLVMdev] 32 bit boolean results
Sorry, accidently hit send hotkeys before finishing email. I am still trying to figure out why my comparison instructions are being modified and overall producing incorrect results. The IR produces correct results, but my backend does not and the only thing I can think of is that the IR is treating the Booleans as i1 and therefore either and'ing or xor'ing the results of my
2006 Nov 24
1
barplot help needed
hello, I would like to create the following barplot: I have 4 different data sets (same length + stddev for each data point) data1 sd1 data2 sd2 data3 sd3 data4 sd4 now, I'd like to plot in the following way: data1[1],data2[1],data3[1],data4[1] with it's sd-values side-by-side at one x-axis label (named "position 1") and each bar in different colors.
2008 Nov 18
0
[LLVMdev] 32 bit boolean results
On Tue, Nov 18, 2008 at 1:56 PM, Villmow, Micah <Micah.Villmow at amd.com> wrote: > The IR produces correct results, but my backend does not and the only thing > I can think of is that the IR is treating the Booleans as i1 and therefore > either and'ing or xor'ing the results of my comparison with the value 1. CodeGen assumes that SETCC(true condition) & 1 == 1, and
2011 Oct 07
2
Merge dataframes
Hello, I am having some problems to use the 'merge' function. I'm not sure if I got its working right. What I want to do is: 1) Suppose I have a dataframe like: height width 1 1.1 2.3 2 2.1 2.5 3 1.8 1.9 4 1.6 2.1 5 1.8 2.4 2) And I generate a second
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
2008 Nov 18
1
[LLVMdev] 32 bit boolean results
You can tell LLVM that you have "sign extended" setCC results (all ones). Dan On Nov 18, 2008, at 5:33 PM, Eli Friedman wrote: > On Tue, Nov 18, 2008 at 1:56 PM, Villmow, Micah > <Micah.Villmow at amd.com> wrote: >> The IR produces correct results, but my backend does not and the >> only thing >> I can think of is that the IR is treating the
2015 Jul 07
2
[LLVMdev] [cfe-dev] 3.6.2-final has been tagged.
On 7 July 2015 at 06:17, Renato Golin <renato.golin at linaro.org> wrote: > ARM+AArch64 up. All gree. Just to note there was a bug in test-release.sh where the script would not exit if the build/tests failed making failures less noticeable. I've fixed it in r241599. It would be a good idea to use that fix unless you are happy combing through the logs for failures.
2008 Oct 21
1
Bootstrap
Hi listers, I've been work on a bootstrap estimator and I don't know how to make a certain manipulation at the data. As an example I have the following data and samples... I need now to identify the vector in wich I sampled the id, I mean that I have to merge the files having the key as the id of the samples in order to find the vector that were selected. Thanks in advance, M?rcio
2006 Aug 02
1
questions on aggregate data
Dear friends, my question is how to aggregate dataset and the inverse manipulation. e.g.My dataset data structure1: x 1 1 2 3 3 data structure2: x freq 1 2 2 1 3 2 Then how to generate dataset2 from dataset1 and generate dataset1 from dataset2? e.g. dataset2 from dataset1 : x<-c(1,1,2,3,3) a<-tab(x) as.data.frame(a) *But i can't do the inverse manipulation:generate dataset1 from
2009 Oct 09
2
Creating a Clustered-Stacked Column Chart
Hi all, In R, is there some functions or ways to create a Clustered-Stacked Column Chart as the example in the following page http://peltiertech.com/Excel/ChartsHowTo/ClusterStack.html? I have browsed the R Graph Gallery (http://addictedtor.free.fr/graphiques/) and searched the R site, and didnot find an appropriate method to do it. Anybody has met this problem before? Thanks a lot.