similar to: Resampling question

Displaying 20 results from an estimated 1000 matches similar to: "Resampling question"

2011 Aug 12
1
Which Durbin-Watson is correct? (weights involved) - using durbinWatsonTest and dwtest (packages car and lmtest)
Hello! I have a data frame mysample (sorry for a long way of creating it below - but I need it in this form, and it works). I regress Y onto X1 through X11 - first without weights, then with weights: regtest1<-lm(Y~., data=mysample[-13])) regtest2<-lm(Y~., data=mysample[-13]),weights=mysample$weight) summary(regtest1) summary(regtest2) Then I calculate Durbin-Watson for both regressions
2011 Aug 10
2
choosing selective data with permutations
Hello, I am a R beginner and hoping to obtain some hints or suggestions about using permutations to sort a data set I have. Here is an example dataset: Ind1 11 00 12 15 28 Ind2 21 33 22 67 52 Ind3 22 45 21 22 56 Ind4 11 25 74 77 42 Ind5 41 32 67 45 22 This will be read into a variable using read.table. What I want to do is permute these individuals and every
2012 Apr 08
2
axis labels not showing
Hello - I want to generate stacked plots with par(mfrow)) function. However, my axis labels aren't showing. My script is here: http://pastebin.com/yXXeMQgb The plot is here: http://www.crypticlineage.net/rdisc/strplot.pdf Thank you for your time. Vikram
2012 Jun 08
2
changing font to italic for one entry in legend()
Hello, I need to change the font for one of the items (C. elegans) in my legend to italic. Can someone suggest how to accomplish this? legend('bottomright', bty='n', c('C. elegans range', 'Study area'), cex=0.8, fill=c('light gray', 'white'), border=c('black','black')) I tried using lab.font=c(1,3) but R ignored and did not write
2017 Oct 20
1
create a loop
Hi R Users, I do have very big data sets and wanted to run some of the analyses many times with randomization (1000 times). I have done the analysis using an example data but it need to be done with randomized data (1000 times). I am doing manually for 10000 times but taking so much time, I wonder whether it is possible to perform the analysis with creating a loop for many replicated datasets?
2007 Apr 26
2
path autocompletion in 2.5.0
Hi, R 2.5.0 isn't auto-completing paths properly as it used to. E.g. suppose I have: > dir("CEL/choe") [1] "chipC-rep1.CEL" "chipC-rep2.CEL" "chipC-rep3.CEL" "chipS-rep1.CEL" [5] "chipS-rep2.CEL" "chipS-rep3.CEL" Now if I do: ReadAffy("CEL/choe/ch<tab> # => ReadAffy("CEL/choe/chip
2012 Apr 13
5
Merging two data frames with different columns names
I am trying to merge two data frames, but one of the column headings are different in the two frames. How can I rjoin or rbind the tho frames? Johnny # Generate 2 blocks by confounding on abc d1 <- conf.design(c(1,1,1), p=2, block.name="blk", treatment.names = c("A","B","C")) d2 <- conf.design(c(1,1,1), p=2, block.name="blk",
2005 Jun 03
2
How to 'de-cross' a table?
Dear R users, I have received a table in the following format: id a b c1 c2 d1 d2 1 1 1 65 97 78 98 2 1 2 65 97 42 97 3 2 1 65 68 97 98 4 2 2 65 97 97 98 Factors of the design are: a, b, and e, where e has levels c and d. The levels c and d then have 2 replicates (r) each. Now I would like to get: id a b e r value 1 1 1 c 1 65 2 1 1
2013 Jan 04
3
help "reshaping" dataframe
List, I want to reshape my data, but I'm not sure how to do it... it might be a simple task, but don't know which package does this. "occ.data" (see below) is how my original data are arranged, and I know that with melt() I can reshape it like "y" (see below). However, I just want to build a matrix like the "y" matrix, but with only 2 dimensions. Something
2008 Mar 30
2
problem with white space
Hi, I need to resample characters from a dataset that consists of an extremely long string that is written over hundreds of thousands of lines, each of length 50 characters. I am currently doing this by first inserting a space after each character in the dataset and then using the following commands: y <- as.matrix(read.table("data.txt"), stringsAsFactors=FALSE) bstrap <-
2005 Jul 19
3
dovecot pop3s delivers new messages as old (unread) messages ...
I just set up dovecot on fedora core 3 with only pop3s protocol enabled. On my client machine, I use fetchmail to get the mail and then go through procmail and eventually ready by mutt. Everything seems to work fine, except that all new emails are marked old unread emails (i.e., marked with 'O' flag instead of 'N'). This is annoying because some open source lists are so large
2005 Mar 29
2
matching vectors against vectors
Hi all. I have a re-occuring typical problem that I don't know how to solve efficiently. The situation is the following: I have a number of data-sets (A,B,C,...) , consisting of an identifier (e.g. 11,12,13,...,20) and a measurement (e.g. in the range 100-120). I want to compile a large table, with all availabe identifiers in all data-sets in the rows, and a column for every
2005 May 31
1
read.delim2 regarding "#"
Hello R experts: When I tried to read my data into R, it does not take # sign A subset of Exp.txt is: Experiment name assay id Varname (A1)DBA TPA 6h/DBA Acetone rep1(A1) #3 4090 A90C1 (A2)DBA TPA 6h/DBA Acetone rep2(A2) #3 4091 A91C1 The command is: Exp <- read.delim2("Exp.txt",check.names=F,as.is=T) It is excuted but gave me all the NAs. Can you all drop me a hint? Thanks
2012 Feb 13
2
best subset selection on random effects model
Hi, I know leaps() computes the best subset selection for linear model, and the bestglm() computes the best subset selection for generalized linear model. Is there any package for best subset selection on random effects model, or mixed effects model? Thank you so much. Tao [[alternative HTML version deleted]]
2013 May 01
3
grep help (character ommission)
Hello, Banging my head against a wall here ... can anyone light the way to a pattern modification that would make the following TRUE? identical( grep( "^Intensity\\s[^HL]", c("Intensity","Intensity L", "Intensity H", "Intensity Rep1")), as.integer(c(1,4))) Thank you for your time. Sincerely, Joh
2010 Dec 11
2
remove quotes from the paste output
Hi, I'm generating the name of the variable with paste function and then using that variable name further to get the specific position value from the data.frame, here is the snippet from my code: modelResults <- extractModelParameters("C:/PilotStudy/Mplus_Input/Test", recursive=TRUE) #extractModelParameters reads all the output files from the Test folder and create the
2011 Aug 27
1
Overdispersed GLM
Hi all, I have the following data: rep1_treat rep2_treat rep1_control rep2_control 2 3 4 5 100 20 98 54 0 1 2 3 23 32 27
2007 Sep 08
1
Problem with the aggregate command
Dear friends, I have a data set with 23 columns and 38000 rows. It is a panel running from the years 1991 through 2005. I want to aggregate the data and get the medians of each of the 23 columns for each of the years. In other words my output should be like this Year Median 1991 123 1992 145 1993 132 etc. The sample lines of code to do this operation is set1 <-
2008 May 04
1
Residual resampling for non linear reg model
I was attempting to use the residual resampling approach to generate 999 bootstrap samples of alpha and beta and find their confidence intervals. However, I keep getting the error message:Error in nls(resample.mp ~ cases/(alpha + (beta * cases)), start = init.values, : singular gradientafter R has only produced a few bootstraps.Could anyone suggest where I am going wrong? Would greatly
2003 Sep 09
2
Matrix resampling (bootstraps)
Dear all, I am trying to generate bootstrap replicate matrixes (rows=samples, column=species, sampling with replacement) from a matrix dataset, but I do not know how to do it in R. I have tried boot() and bootstrap(), but they require an statistic, which in my case is cluster analysis (generating bootstrap values for a cluster analysis is a topic that has been mentioned previously in