similar to: biasing conditional sample

Displaying 20 results from an estimated 20000 matches similar to: "biasing conditional sample"

2012 Dec 29
1
Problem to load a shape file
Dear all, I've been puzzled why I not able to load a shapefile from a connection. Does anyone here can give a reasonable answer? When I try the following script I got this error: Error in getinfo.shape(fn) : Error opening SHP file #Reproduction temp <- tempfile() download.file("http://metodologiapolitica.com/download/Brasil.zip",temp) shp.br <- readShapePoly(unzip(temp,
2012 Jun 07
3
conditional statement to replace values in dataframe with NA
Hello and thanks for helping. #some data L3 <- LETTERS[1:3] dat1 <- data.frame(cbind(x=1, y=rep(1:3,2), fac=sample(L3, 6, replace=TRUE))) #When x==1 and y==1 I want to replace the 1 values with NA #I can select the rows I want: dat2<-subset(dat1,x==1 & y==1) #replace the 1 with NA dat2$x<-rep(NA,nrow(dat2) dat2$y<-rep(NA,nrow(dat2) #select the other rows and rbind
2013 Mar 27
9
conditional Dataframe filling
Hi everyone: This may be trivial but I just have not been able to figure it out. Imagine the following dataframe: a b c d TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE I would like to create a new dataframe, in which TRUE gets 0 but if false then add 1 to the cell to the left. So the results for the example above should be something like: a b c
2013 May 07
4
how to calculate the mean in a period of time?
Hi, Your question is still not clear. May be this helps: dat2<- read.table(text=" patient_id????? t???????? scores 1????????????????????? 0??????????????? 1.6 1????????????????????? 1??????????????? 2.6 1????????????????????? 2???????????????? 2.2 1????????????????????? 3???????????????? 1.8 2????????????????????? 0????????????????? 2.3 2?????????????????????? 2???????????????? 2.5
2023 Oct 14
2
Create new data frame with conditional sums
Well, here's one way to do it: (dat is your example data frame) Cutoff <- seq(0, .15, .01) Pop <- with(dat, sapply(Cutoff, \(p)sum(Totpop[Pct >= p]))) I think there must be a more efficient way to do it with cumsum(), though. Cheers, Bert On Sat, Oct 14, 2023 at 12:53?AM Jason Stout, M.D. <jason.stout at duke.edu> wrote: > > This seems like it should be simple but I
2013 Mar 27
1
Conditional CCA and Monte Carlo - Help!
Hi All, I am using canonical correspondence analysis to compare a community composition matrix to a matrix of sample spatial relationships and environmental variables. In order to parse out how much variance is explained purely by space (S/E) or the environment (E/S) I am using a conditional (partial) CCA. I want to test significance via Monte Carlo but I can not find a way to do this with a
2012 Aug 31
3
fitting lognormal censored data
Hi , I am trying to get some estimator based on lognormal distribution when we have left,interval, and right censored data. Since, there is now avalible pakage in R can help me in this, I had to write my own code using Newton Raphson method which requires first and second derivative of log likelihood but my problem after runing the code is the estimators were too high. with this email ,I provide
2012 Nov 18
1
dealing with Date vars
Hi all, I'm writing a function that summarizes objects, however, when a Date variable is present in the objects it doesn't work. How can I handle with this problem? D
2012 Nov 14
1
Winsorisation function
Dear all, someone can find what I doing wrong with the following function. It is for winsorisation mean. At my eyes it is ok, but for reason I sometimes it is changing the results when I change the k value. wmean <- function (x, na.rm = FALSE, k = 1) { if (any(i.na <- is.na(x))) { if (na.rm) x <- x[!i.na] else return(NA) } n
2012 Aug 29
2
Estimation parameters of lognormal censored data
Hi, I am trying to get the maximum likelihood estimator for lognormal distribution with censored data;when we have left, interval and right censord. I built my code in R, by writing the deriving of log likelihood function and using newton raphson method but my estimators were too high " overestimation", where the values exceed the 1000 in some runing of my code. is there any one can
2012 Sep 06
3
How to find the non matching vectors among these five, if so how we can find the non matching element of that vectors?
Hello, Say all the below five vectors should have same elements in any situation. How to find the non matching vectors among these five, if so how we can find the non matching elements of those vectors? Can anyone help? a=c(1,2,3) b=c(1,2,3,4) c=c(1,2,3) d=c(1,2,3) e=c(1,4,5) identical(a,b,c,d,e) Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13 Sept 2012, Ocean Place Resort -
2018 May 28
3
How to generate a conditional dummy in R?
Hi everyone, I am trying to generate a conditional dummy variable ?X" with the following rules set X=1 if Y is =1, two years prior to the NA. [0,0,NA]. For example, if the pattern for Y is 0,0,NA then the X variable is =0 for all the two years prior to the NA. If the pattern for Y is 0,1,NA or 1,0,NA then the X =1 . To be clear, if 1,1,NA then the X=1 that first specific year, it
2008 Oct 01
1
Bias in sample - Logistic Regression
Hi. This is my first mail. I am new to R and also to the company where I am employed now. I have Statistics background (i.e. Master of Science). However, it is only now I understand what I learned in text is simply a bookish knowledge and when it comes to actually applying statistics in real life, things are not simple. But I am sure I will accordingly upgrade myself. In my new company, I had
2011 Oct 14
1
Party package: varimp(..., conditional=TRUE) error: term 1 would require 9e+12 columns
I would like to build a forest of regression trees to see how well some covariates predict a response variable and to examine the importance of the covariates. I have a small number of covariates (8) and large number of records (27368). The response and all of the covariates are continuous variables. A cursory examination of the covariates does not suggest they are correlated in a simple fashion
2013 May 06
2
BIOENV
Dear all, Does anyone knows why the results of a BIOENV (PRIMER v. 6.1.15) are diferent of the bioenv() + mantel() in vegan? Not the spearman correlation, indeed the pseudo-p value. I know that the approach bioenv() + mantel() is biased. So, how the BIOENV (PRIMER) ends with larger p values (permutated). Acctualy how the permutation test in BIOENV (PRIMER) is conducted. The user guide does not
2008 Jul 09
1
Evolution in CentOS 5.2
(Probably OT) Has anyone else noticed these flaky (new?) behaviors in Evo since the 5.2 upgrade: - REALLY slow saving messages from inbox to another folder - search capability separated by folder instead of overall (with no option for control) - failure to autocomplete email addresses for known contacts I think that's it. I was wondering if it was just me, or if others had noticed this.
2005 Mar 09
2
Question about biasing in sd()???
Hi, Can anyone help me with the following. I have been using R for Monte Carlo simulations and got some results I couldn't explain. Therefor I performed following short test: -------------- mean.sds <- NULL sample.sizes <- 3:30 for(N in sample.sizes){ dum <- NULL for(I in 1:5000){ x <- rnorm(N,0,1) dum <- c(dum,sd(x)) } mean.sds<- c(mean.sds,mean(dum)) }
2007 Nov 15
1
Problem with rsync recent file logic ?
Hello, I have 2 servers I'm synchronizing using rsync, I have a situation where I : 1. rsync from rnd-dev2 to rnd-dev1 2. change the rsynched file on rnd-dev1 3. rsync from rnd-dev2 to rnd-dev1 again 4. File gets overridden on rnd-dev1 over though it has newer change time then file on rnd-dev2. here is the bug(?) reproduction: [root@rnd-dev1 test_rsync]# rsync --version rsync version
2007 Aug 20
6
Using case in class
OK, I started down this road a few months ago and got side tracked with project work. I have a class called "install" that I want to use with only machines on one protected subnet. In my site.pp file, among other node entries, I have - node default { install } The class itself - class install { case $domain { "test.example.com": { file:
2012 Mar 30
4
[PATCH] virtio_blk: Drop unused request tracking list
Benchmark shows small performance improvement on fusion io device. Before: seq-read : io=1,024MB, bw=19,982KB/s, iops=39,964, runt= 52475msec seq-write: io=1,024MB, bw=20,321KB/s, iops=40,641, runt= 51601msec rnd-read : io=1,024MB, bw=15,404KB/s, iops=30,808, runt= 68070msec rnd-write: io=1,024MB, bw=14,776KB/s, iops=29,552, runt= 70963msec After: seq-read : io=1,024MB, bw=20,343KB/s,