Re: [R] Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

2018-11-29 Thread Janh Anni
Hi Marc, I see what you are saying. I will try re-running the* boot.two.per* function using 1's and 0's for the data and specifying mean as the parameter and see what happens. I will report back. Thanks so much for your kind assistance! Janh On Thu, Nov 29, 2018 at 7:07 PM Marc Schwartz

Re: [R] Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

2018-11-29 Thread Marc Schwartz via R-help
Hi, I don't see Duncan's reply in the archive, but consider: > 1 / 4 [1] 0.25 > mean(c(1, 0, 0, 0)) [1] 0.25 > 3 / 9 [1] 0.333 > mean(c(1, 1, 1, 0, 0, 0, 0, 0, 0)) [1] 0.333 Regards, Marc Schwartz > On Nov 29, 2018, at 6:57 PM, Janh Anni wrote: > > Hi Bert, > > You mean, just

Re: [R] Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

2018-11-29 Thread Janh Anni
Hi Bert, You mean, just compute the test specifying the mean as the parameter but using 1's and 0's for the data? Also I don't get how a proportion is a mean of 0/1 responses. Could you please elaborate? Thanks! Janh On Thu, Nov 29, 2018 at 6:45 PM Bert Gunter wrote: > ... but as Duncan

Re: [R] Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

2018-11-29 Thread Bert Gunter
... but as Duncan pointed out already, I believe, a proportion **is** a mean -- of 0/1 responses. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Nov 29,

Re: [R] Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

2018-11-29 Thread Janh Anni
Hi Rui, Thanks a lot for responding and I apologize for my late response. I tried using the *boot.two.per* function in the wBoot package which stated that it could bootstrap 2-sample tests for both means and proportions but it turned out that it only works for the mean. Thanks again, Janh On

Re: [R] Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

2018-11-28 Thread Rui Barradas
Hello, What have you tried? Reproducible example please. http://adv-r.had.co.nz/Reproducibility.html https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example https://www.r-bloggers.com/minimal-reproducible-examples/ Rui Barradas Às 22:33 de 27/11/2018, Janh Anni

[R] Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

2018-11-27 Thread Janh Anni
Hello R Experts! Does anyone know of a relatively straightforward way to bootstrap hypothesis tests for proportion in R? Thanks in advance! Janh [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

[R] bootstrapping results in table format

2017-10-07 Thread Peter Wagey
Hi R users, I was struggling to put the results into table format. Would you mind to show using following data and code how we can put the results into table? I further would like to have a confidence interval for each group. set.seed(1000) data <- as.data.table(list(x1 = runif(200), x2 =

Re: [R] Bootstrapping in R

2016-10-19 Thread Bryan Mac
Hi, After running the bootstrapping, I would like to the output of the bootstrapped samples. How can I view the bootstrapped samples of each variable? Bryan Mac bryanmac...@gmail.com > On Oct 18, 2016, at 3:57 AM, Rui Barradas wrote: > > It means that the sd of the

Re: [R] Bootstrapping in R

2016-10-03 Thread ruipbarradas
Hello, I've just ran your code and it all went well. So my doubt is: if you have 1269 rows why choose only 100 and bootstrap? It doesn't seem to make much sense to me. Try to run the entire df through DataSummary  and compare the results with the bootstrap results. Rui Barradas   Citando

Re: [R] Bootstrapping in R

2016-10-03 Thread Bryan Mac
Hi all, Here is the first six rows of my data. In total I have 1269 rows. My goal is to get conduct nonparametric bootstrap and case resampling. I would like to randomly select 100 out of the 1269 After that, I wish to bootstrap that randomly selected 100 out of 1269. I assume I need to set

Re: [R] Bootstrapping in R

2016-10-02 Thread ruipbarradas
Right. To see it in action just compare the results of the two calls to boot. library(boot) set.seed(1007) x <- rnorm(100) y <- x + rnorm(100) dat <- data.frame(x, y) #Wrong stat1 <- function(DF, f){ model <- lm(DF$y ~ DF$x, data = DF[f,]) #Doesn't bootstrap DF coef(model) }

Re: [R] Bootstrapping in R

2016-10-02 Thread peter dalgaard
> On 01 Oct 2016, at 16:11 , Daniel Nordlund wrote: > > You haven't told us anything about the structure of your data, or the > definition of the DataSummary function. Yes. Just let me add that a common error with boot() is not to pay attention to the required form of

Re: [R] Bootstrapping in R

2016-10-01 Thread Christoph Puschmann
Dear Rui, You can insert a “formula” argument in the code. For example, if you boot a regression, you can insert the formula in the command. Though I just realised that it is not necessary to do. All the best, Christoph > On 1 Oct 2016, at 19:49, ruipbarra...@sapo.pt wrote: > > Sorry, but

Re: [R] Bootstrapping in R

2016-10-01 Thread ruipbarradas
Sorry, but what formula? formula is not a ?boot argument. To the OP: Michael is probably right, if you reset the seed each time, you'll get equal values, otherwise you should get different results due to randomization. Rui Barradas Quoting Christoph Puschmann

Re: [R] Bootstrapping in R

2016-10-01 Thread Christoph Puschmann
Dear Bryan, Did you try to include formula in the boot command? like: results <- boot(data, statistic, R, formula) All the best, Christoph > On 1 Oct 2016, at 19:24, Michael Dewey wrote: > > Dear Bryan > > You are not resetting the seed each time by any chance? >

Re: [R] Bootstrapping in R

2016-10-01 Thread Daniel Nordlund
On 9/30/2016 6:44 PM, Bryan Mac wrote: Hi, I have read the help page and it was helpful but, I am having concerns because each time I run this code I get the same value. I expected that each time I run the code, I will get different values due to random sampling. How do I get this

Re: [R] Bootstrapping in R

2016-10-01 Thread Michael Dewey
Dear Bryan You are not resetting the seed each time by any chance? Michael On 01/10/2016 02:44, Bryan Mac wrote: Hi, I have read the help page and it was helpful but, I am having concerns because each time I run this code I get the same value. I expected that each time I run the code, I

Re: [R] Bootstrapping in R

2016-10-01 Thread Bryan Mac
Hi, I have read the help page and it was helpful but, I am having concerns because each time I run this code I get the same value. I expected that each time I run the code, I will get different values due to random sampling. How do I get this randomization? The values shouldn’t be the same

Re: [R] Bootstrapping in R

2016-09-29 Thread ruipbarradas
Hello, Read the help page ?boot::boot. For instance, try the following. library(boot) x <- rnorm(100) stat <- function(x, f) mean(x[f]) boot(x, stat, R = 100) Hope this helps, Rui Barradas Citando bryan.mac24 : Hi all, I am wondering how to conduct bootstrapping

[R] Bootstrapping in R

2016-09-29 Thread bryan.mac24
Hi all, I am wondering how to conduct bootstrapping in R. I need bootstrap 100 times. The trick I need to figure out is how to do get a random sample of 100 out of the total number of case. Best, BM [[alternative HTML version deleted]] __

[R] bootstrapping code with ordered categorical data(five categories)

2016-05-06 Thread thanoon younis
Hi I need a bootstrapping code with ordered categorical data(five categories) to re-samplling a real data with 16 variables and 200 sample size. Any help please -- Thanoon Y. Thanoon PhD Department of Mathematical Sciences Faculty of Science University Technology Malaysia, UTM E.Mail:

[R] bootstrapping statistics from leaken package

2015-12-31 Thread Benedetto Rocchi
I am trying to generate a confidence interval for the statistic arpt (at risk of poverty threshold generated with the package leaken) using the package boot. This is my temptative script (where XH090 and DB030 and w are variables of an attached dataframe): > arpt.boot <- function(data,i){ > d

Re: [R] bootstrapping statistics from leaken package

2015-12-31 Thread Bert Gunter
Try d= data[ ,i] instead of d= data[i] in your function. If that doesn't help, I think we would have to know more about the structure of your data. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley

[R] Bootstrapping Standard errors of nonlinear GMM obtained from BFGS (Optimx)

2015-06-28 Thread Olu Ola via R-help
Hello, I am running a 2 equation system of nonlinear GMM using BFGS in optimx. Using the conventional way of calculating the standard error of the estimates gives NAN's for some of the standard errors. As a result, I want to bootstrap the standard error. A way forward on how to bootsrap the

[R] Bootstrapping Tukey Kramer:

2014-06-02 Thread Alexis Billings
Hi, I have run a Tukey Kramer on my mixed effects models (using lmer). However, I have non-normal data that can't really be transformed because it includes negative numbers. So, I have opted to use a parametric bootstrap to deal with the violation of the assumptions. Here is my code for the

Re: [R] bootstrapping for maxium data

2014-05-21 Thread David Winsemius
Run the examples in the ?boot help page. Notice that boot needs a function that accepts a dataframe and an index vector. Sent from my iPhone On May 21, 2014, at 1:49 AM, 张以春 yczh...@nigpas.ac.cn wrote: Dear friends, I have a numeric vector composed of 320 numbers. Now, I want to

Re: [R] bootstrapping for maxium data

2014-05-21 Thread Bert Gunter
Perhaps it should be mentioned that resampling does not produce a correct CI for extreme quantiles, so the whole exercise may be pointless. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is

Re: [R] bootstrapping for maxium data

2014-05-21 Thread Angelo Canty
Yichun, 1. You are doing this wrong! 2. It is the wrong thing to do! In more detail: 1. To use boot, it helps to read the help file which clearly says the statistic must be a function of two arguments, the original dataset and the indices saying which of the original datapoints are in the

[R] bootstrapping for maxium data

2014-05-20 Thread 张以春
Dear friends, I have a numeric vector composed of 320 numbers. Now, I want to do resample for 1 times. I want to get maxium number for every trial and get a 1 maxium numbers. I have tried to use boot package such as follows.

[R] Bootstrapping the prediction intervals for regression

2014-05-15 Thread varin sacha
Dear experts, I have done a multiple linear regression on a small sample size (n=22). I have computed the prediction intervals (not the confidence intervals). Now I am trying to bootstrap the prediction intervals. I didn't find any package doing that. So I decide to create my own R function,

Re: [R] Bootstrapping the prediction intervals for regression

2014-05-15 Thread Rui Barradas
Hello, Try to follow the example below and see if you can adapt it to your needs. Since you don't provide us with a dataset example, I start by making up some. # make up some data n - 22 set.seed(8873) dat - data.frame(x1 = rnorm(n), x2 = rnorm(n)) dat$y - x1 + x2 + rnorm(n) B - 100 #

Re: [R] Bootstrapping the prediction intervals for regression

2014-05-15 Thread varin sacha
Hi Rui, Many thanks for your response. I have tried to adapt your code to my problem, but there is still a mistake text LinearModel.1 - lm(GDP.per.head ~ Competitivness.score + Quality.score,   data=Dataset) B - 500  # number of bootstrap samples result - array(dim = c(22, 3, B)) for(i in 1:B)

Re: [R] Bootstrapping the prediction intervals for regression

2014-05-15 Thread Bert Gunter
Please note that this can (and should) be considerably sped up by taking advantage of the fact that lm() will work on a matrix of responses. Also, some improvement in speed can usually be obtained by generating all samples at once rather than generating the sample each time within a loop.

Re: [R] Bootstrapping the prediction intervals for regression

2014-05-15 Thread varin sacha
Thanks Bert for your suggestion that is working. To answer to your question, I can say that some econometricians say that using bootstrap techniques on a linear regression model when the sample size N is small, one of the most interesting purpose is on the prediction intervals which is better

Re: [R] Bootstrapping the prediction intervals for regression

2014-05-15 Thread Rui Barradas
Hello, The jackknife is used as a bias reduction technique, and since linear regression estimates are unbiased I don't see why you should use it. Rui Barradas Em 15-05-2014 19:21, varin sacha escreveu: Thanks Bert for your suggestion that is working. To answer to your question, I can say

[R] Bootstrapping mean for two and more variables by group

2014-03-25 Thread Kristi Glover
Hi R User, Would you give me some hints on how I can calculate bootstrapping mean+-SE for each column based by group. I searched it but I could not get what I wanted. For example I have these data set data - as.data.table(list(x1 = runif(200), x2 = runif(200), group = runif(200)0.5)) I wanted

Re: [R] Bootstrapping with Kendall's tau

2014-03-07 Thread Therneau, Terry M., Ph.D.
With respect to question 2, I use the wild bootstrap for tau. Wu, C.F.J. (1986). Jackknife, bootstrap and other resampling methods in regression analysis (with discussions). Annals of Statistics, 14, 1261-1350. -- begin included message -- I want to bootstrap Kendall's tau

Re: [R] Bootstrapping with Kendall's tau---Wild bootstrap

2014-03-07 Thread David Parkhurst
Thank you for the suggestion. Is there a function for doing that in R? David On 3/7/2014 9:50 AM, Therneau, Terry M., Ph.D. wrote: With respect to question 2, I use the wild bootstrap for tau. Wu, C.F.J. (1986). Jackknife, bootstrap and other resampling methods in regression analysis

[R] Bootstrapping with Kendall's tau

2014-03-06 Thread David Parkhurst
I want to bootstrap Kendall's tau correlation with data that have many NAs. I tried this example: x - 1:15 y - c(2,4,1,3,5, 7,6, 9,10,8, 14, 13, 11, 15, 12) x[3] - NA; x[11] - NA; x[8] - NA y[2] - NA; y[8] - NA; y[12] - NA cor(x,y,use=complete.obs,method=kendall) library(boot) tmpdf -

[R] bootstrapping respecting subject level information

2013-07-04 Thread Sol Lago
Hi there, This is the first time I use this forum, and I want to say from the start I am not a skilled programmer. So please let me know if the question or code were unclear! I am trying to bootstrap an interaction (that is my test statistic) using the package boot. My problem is that for

Re: [R] bootstrapping respecting subject level information

2013-07-04 Thread David Winsemius
On Jul 3, 2013, at 7:19 PM, Sol Lago wrote: Hi there, This is the first time I use this forum, and I want to say from the start I am not a skilled programmer. So please let me know if the question or code were unclear! I am trying to bootstrap an interaction (that is my test

Re: [R] bootstrapping respecting subject level information

2013-07-04 Thread Andrew Robinson
I'd like to preface this answer by suggesting that if you have multiple measurements within subjects then you should possibly be thinking about using mixed-effects models. Here you have a balanced design and seem to be thinking about a constrained bootstrap, but I don't know whether the resulting

Re: [R] bootstrapping respecting subject level information

2013-07-04 Thread Andrew Robinson
I think that in the case of a 2*2 balanced, replicated design such as this one, interpreting the interaction should be safe. Cheers Andrew On Fri, Jul 5, 2013 at 9:38 AM, David Winsemius dwinsem...@comcast.net wrote: On Jul 3, 2013, at 7:19 PM, Sol Lago wrote: Hi there, This is the first

Re: [R] bootstrapping respecting subject level information

2013-07-04 Thread Joshua Wiley
Hi, It is not the easiest to follow code, but when I was working at UCLA, I wrote a page demonstrating a multilevel bootstrap, where I use a two stage sampler, (re)sampling at each level. In your case, could be first draw subjects, then draw observations within subjects. A strata only option

Re: [R] bootstrapping respecting subject level information

2013-07-04 Thread Andrew Robinson
Josh's comment prompted me to check mty go-to reference. Davison and Hinckley (1997 Section 3.8) recommend sampling the Subjects, but not within the Subjects. Cheers Andrew On Thu, Jul 04, 2013 at 05:53:58PM -0700, Joshua Wiley wrote: Hi, It is not the easiest to follow code, but when I was

[R] Bootstrapping in R

2013-04-25 Thread Preetam Pal
Hi all, 1i have 3 vectors a,b and c, each of length 25... i want to define a new data frame z such that z[1] = (a[1] b[1] c[1]), z[2] = (a[2] b[2] c[2]) and so on...how do i do it in R 2 Then i want to draw bootstrap samples from z. Kindly suggest how i can do this in R. Thanks, Preetam

Re: [R] Bootstrapping in R

2013-04-25 Thread Michael Weylandt
On Apr 25, 2013, at 7:02, Preetam Pal lordpree...@gmail.com wrote: Hi all, 1i have 3 vectors a,b and c, each of length 25... i want to define a new data frame z such that z[1] = (a[1] b[1] c[1]), z[2] = (a[2] b[2] c[2]) and so on...how do i do it in R z - data.frame(a, b, c) 2

Re: [R] Bootstrapping in R

2013-04-25 Thread David Carlson
: Thursday, April 25, 2013 4:36 AM To: Preetam Pal Cc: r-help@r-project.org Subject: Re: [R] Bootstrapping in R On Apr 25, 2013, at 7:02, Preetam Pal lordpree...@gmail.com wrote: Hi all, 1i have 3 vectors a,b and c, each of length 25... i want to 1define a new data frame z such that z[1

Re: [R] Bootstrapping a 11x10 matrix

2013-04-24 Thread Adams, Jean
Herbejie Rose, You could use the boot() function in the R package boot. For example: # example data matrix m - matrix(sample(11*10), ncol=10) # function to calculate column means for indexed rows of matrix myfun - function(data, i) { apply(data[i, ], 2, mean) } # 1000 bootstrap samples

[R] Bootstrapping a 11x10 matrix

2013-04-23 Thread Herbejie Rose Cuizon
Good evening! This is Herbejie Rose I need your help for me to compute the following: I just want to ask on how to bootstrap a 11x10 matrix to obtain 1000 bootstrap samples and compute the 10 dimensional mean per bootstrap sample. the 11x10 dimension of the matrix has 11 subjects and 10

Re: [R] Bootstrapping issues

2012-11-14 Thread PIKAL Petr
Hi Just a copy :-) Answers please! Anyway, did my answer resolve your issue? Petr From: Clive Nicholas [mailto:cliveli...@googlemail.com] Sent: Wednesday, November 14, 2012 4:07 AM To: PIKAL Petr Cc: r-help@r-project.org Subject: Re: [R] Bootstrapping issues Thank you for your answer - I

Re: [R] Bootstrapping issues

2012-11-14 Thread Clive Nicholas
-help@r-project.org *Subject:* Re: [R] Bootstrapping issues ** ** Thank you for your answer - I will consult the help file to see if it has anything to useful to say by way of a solution - but I don't understand why you accused me of shouting. ** ** I merely pasted in the R

Re: [R] Bootstrapping issues

2012-11-13 Thread PIKAL Petr
Hi From: Clive Nicholas [mailto:cliveli...@googlemail.com] Sent: Tuesday, November 13, 2012 3:12 AM To: PIKAL Petr Cc: r-help@r-project.org Subject: Re: [R] Bootstrapping issues Petr Pikal replied: [...] The following works results - boot(data=test, statistic=bs, R=1000, A~B+C+D+C*D

Re: [R] Bootstrapping issues

2012-11-13 Thread Clive Nicholas
: [R] Bootstrapping issues ** ** Petr Pikal replied: ** ** [...] ** ** The following works results - boot(data=test, statistic=bs, R=1000, A~B+C+D+C*D) Actually it does not work either ** ** Correct, but I _did_ get it to work shortly before my initial

[R] Bootstrapping issues

2012-11-12 Thread Clive Nicholas
sessionInfo()R version 2.15.2 (2012-10-26) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 [4] LC_COLLATE=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 [7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C [10]

Re: [R] Bootstrapping issues

2012-11-12 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Clive Nicholas Sent: Monday, November 12, 2012 8:06 AM To: r-help@r-project.org Subject: [R] Bootstrapping issues sessionInfo()R version 2.15.2 (2012-10-26) Platform

Re: [R] Bootstrapping issues

2012-11-12 Thread Clive Nicholas
Petr Pikal replied: [...] The following works results - boot(data=test, statistic=bs, R=1000, A~B+C+D+C*D) Actually it does not work either Correct, but I _did_ get it to work shortly before my initial post (sorry for not showing it, but I didn't save the output - silly me). What

Re: [R] bootstrapping quantile regression

2012-10-31 Thread Kay Cichini
sry, I forgot to replace rlm() - but actually I tried both and the question applies to both approaches.. Am 31.10.2012 00:19 schrieb Kay Cichini kay.cich...@gmail.com: HI everyone, I try to get some bootstrap CIs for coefficients obtained by quantile regression. I have influencial values and

Re: [R] bootstrapping quantile regression

2012-10-31 Thread Roger Koenker
There is no automatic clustering option for QR bootstrapping. You will have to roll your own. url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax:

Re: [R] bootstrapping quantile regression

2012-10-31 Thread Frank Harrell
A piece of this is solved by the rms package's Rq and bootcov functions. -Frank Roger Koenker-3 wrote There is no automatic clustering option for QR bootstrapping. You will have to roll your own. url:www.econ.uiuc.edu/~rogerRoger Koenker email rkoenker@

Re: [R] bootstrapping quantile regression

2012-10-31 Thread David Freedman
A possiblie solution might be to use the survey package. You could specify that the data is clustered using the svydesign function, and then speciy the replicate weights using the as.svrepdesign function. And then, it would be possible to use the withReplicates function to bootstrap the clusters

[R] bootstrapping quantile regression

2012-10-30 Thread Kay Cichini
HI everyone, I try to get some bootstrap CIs for coefficients obtained by quantile regression. I have influencial values and thus switched to quantreg.. The data is clustered and within clusters the variance of my DV = 0.. Is this sensible for the below data? And what about the warnings? Thanks

[R] Bootstrapping

2012-06-16 Thread Skorp
hello, I am trying to implement the bootstrapping to a set of insurance claim data in triangular form using the ChainLadder package. I want to obtain the prediction errors of the reserve estimate using the result from bootstrapping, here is the output: BootChainLadder(Triangle =

Re: [R] Bootstrapping

2012-02-27 Thread Jim Silverton
Hi, I am doing some bootstrap. This the is the method I am procceding: I select a value of sigma and set the sharp ratio = 4. From this I can compute the mean mu. For a set sample size say n = 11, I generate 999 samples of size 11 with the sigma and mean above. This is a 11 x 999 matrix. Now, I

[R] bootstrapping quantile regression

2012-02-15 Thread Julia Lira
Dear all, I am currently running an experiment using quantile regression. In order to get more accurate results for a hypothesis test, I need to run a bootstrapping version of quantile regression and I need to find the estimated covariance matrix among all the coefficients for several

[R] Bootstrapping nlme models

2012-01-06 Thread lynnland
Hi, Let me start my saying that I am new to R hence my grasp of the appropriate used of R coding is undoubtedly way behind many on this forum. I am trying to use boostrapping to derive errors around my parameter estimate for the fixed effects in the following model. It is simply estimating the

[R] Bootstrapping

2011-12-06 Thread Bastian Offermann
Hello, I am having some trouble setting up a bootstrapping prodecure. I create artificial data and would like to use these to bootstrap a t-test statistic from these. Especially I do not really get how boot uses the indices variable or i variable. Can anybody help out? Thanks!! b0 - 1/2

[R] Bootstrapping for residuals

2011-11-30 Thread bubbles1990
Hi, Ive been trying to write a program for bootstrapping residuals in R but without much success. A lecturer wants to predict the performance of students in an end-of-year physics exam, y. The lecturer has the students results from a mid-term physics exam, x, and a mid-term biology exam, z. He

Re: [R] Bootstrapping for residuals

2011-11-30 Thread David Winsemius
On Nov 30, 2011, at 11:31 AM, bubbles1990 wrote: Hi, Ive been trying to write a program for bootstrapping residuals in R but without much success. A lecturer wants to predict the performance of students in an end-of- year physics exam, y. The lecturer has the students results from a

Re: [R] Bootstrapping for residuals

2011-11-30 Thread bubbles1990
I study a part-time long distance learning course so only really have access to online sources for help, i'm sure ill crack it eventually. I understand how to do it with 2 variables, its just having 3 that is confusing me -- View this message in context:

Re: [R] Bootstrapping for residuals

2011-11-30 Thread David Winsemius
On Nov 30, 2011, at 11:31 AM, bubbles1990 wrote: Hi, Ive been trying to write a program for bootstrapping residuals in R but without much success. A lecturer wants to predict the performance of students in an end-of- year physics exam, y. The lecturer has the students results from a

Re: [R] Bootstrapping a covariance matrix

2011-09-04 Thread R. Michael Weylandt
Your code seems generally ok (though I wonder why you define a function Var() to do exactly the same thing as var) but your problem is with your use of mean, not in the bootstrap code. It collapses things into a vector before taking a mean -- c.f., R x = array(1:27,c(3,3,3)) R mean(x) [1] 14

[R] Bootstrapping a covariance matrix

2011-09-03 Thread meddee
Dear all I am a bit new to R so please keep your swords sheathed! I would simply like to bootstrap a covariance matrix from a multivariate gaussian density. At face value that seemed like a very straightforward problem to solve but I somehow could not get the boot package to work and did not

[R] Bootstrapping confidence intervals

2011-05-03 Thread khosoda
Hi, Sorry for repeated question. I performed logistic regression using lrm and penalized it with pentrace function. I wanted to get confidence intervals of odds ratio of each predictor and summary(MyModel) gave them. I also tried to get bootstrapping standard errors in the logistic regression.

Re: [R] bootstrapping problem

2011-05-02 Thread Uwe Ligges
On 29.04.2011 09:01, mimato wrote: I want to classify bipolar neurons in human cochleas and have data of the following structure: Vol_Nuc Vol_Soma 1 186.23 731.96 2 204.58 4370.96 3 539.98 7344.86 4 477.71 6939.28 5 421.22 5588.53 6 276.61 1017.05 7 392.28 6392.32 8

[R] bootstrapping problem

2011-04-29 Thread mimato
I want to classify bipolar neurons in human cochleas and have data of the following structure: Vol_Nuc Vol_Soma 1 186.23 731.96 2 204.58 4370.96 3 539.98 7344.86 4 477.71 6939.28 5 421.22 5588.53 6 276.61 1017.05 7 392.28 6392.32 8 424.43 6190.13 9 256.41 3850.51 10

[R] Bootstrapping the colMeans statistic

2011-03-28 Thread kim.elmore
I have a fair bit of experience with S-Plus and have been asked to port some of my S-Plus bootstrapping functions to R, to which I am relatively new, Needless to say, I've run into some problems. In particular, I need to perform bootstrap resampling of the colMeans function using a moving

[R] Bootstrapping to Correct Standard Errors in Two-Stage Least Square Estimation

2011-01-12 Thread Thanaset
Dear friends I want to estimate an equation using two-stage least square but suspect that the model suffers from autocorrelation. Can someone please advise how to implement bootstrapping method in order to calculate the correct standard errors in R? Thank you. Kind regards Thanaset -- View

[R] bootstrapping nonlinear mixed effects models

2010-10-20 Thread Juliet Ndukum
In order to bootstrap nonlinear regression, the following code works. library(nlme) data(Soybean) fm1.nls - nls(weight ~ SSlogis(Time, a, b, c), data=Soybean) summary(fm1.nls) bstat - function(A, indices) { mboot - nls(weight ~ SSlogis(Time, a, b, c), data=Soybean[indices, ])

Re: [R] Bootstrapping Krippendorff's alpha coefficient

2010-10-13 Thread Jim Lemon
On 10/12/2010 08:58 PM, Łukasz Ręcławowicz wrote: Hi, I don't know how to sample such data, it can't be done by row sampling as default method on matrix in boot. Function takes matrix and returns single coefficient. #There is a macro but I want use R :)

[R] Bootstrapping Krippendorff's alpha coefficient

2010-10-12 Thread Łukasz Ręcławowicz
Hi, I don't know how to sample such data, it can't be done by row sampling as default method on matrix in boot. Function takes matrix and returns single coefficient. #There is a macro but I want use R :) http://www.comm.ohio-state.edu/ahayes/SPSS%20programs/kalphav2_1.SPS library(concord)

[R] bootstrapping

2010-09-11 Thread Gregory Ryslik
Hi Everyone, I am implementing a special case of Random forests. At one point, I have a list of which I then sample for replacement. So if the list is 100 elements, I get 100 elements some of them duplicates. How can I easily get the elements that were not included in the list? I realize i can

Re: [R] bootstrapping

2010-09-11 Thread David Winsemius
On Sep 11, 2010, at 9:50 AM, Gregory Ryslik wrote: Hi Everyone, I am implementing a special case of Random forests. At one point, I have a list of which I then sample for replacement. So if the list is 100 elements, I get 100 elements some of them duplicates. How can I easily get the

[R] bootstrapping: multilevel and multiple mediation

2010-07-08 Thread Beatriz Sora Miana
Hello, Have someone performed a bootstrap in a multiple-mediator model? I am trying to compute a bootstrap in a multiple and multilevel mediation. Up top now, I have developed bootstraps in random coeffient models, but I am very lost concerning the mediation. Could someone to provide me some

[R] bootstrapping an svm

2010-05-14 Thread Vaibhav Devidas Patil
Hello I am playing around trying to bootstrap an svm model using a training set and a test set. I've written another function, auc, which I call here, and am bootstrapping. I did this successfully with logistic regression, but I am getting an error from the starred ** line which I

[R] Bootstrapping a repeated measures ANOVA

2010-04-16 Thread Fischer, Felix
Hello everyone, i have a question regarding the sampling process in boot(). I try to bootstrap F-values for a repeated measures ANOVA to get a confidence interval of F-values. Unfortunately, while the aov works fine, it fails in the boot()-function. I think the problem might be that the

Re: [R] Bootstrapping a repeated measures ANOVA

2010-04-16 Thread Charles C. Berry
On Fri, 16 Apr 2010, Fischer, Felix wrote: Hello everyone, i have a question regarding the sampling process in boot(). PLEASE ... provide commented, minimal, self-contained, reproducible code. Which means something a correspondent could actually run. But before that, a careful reading of

Re: [R] Bootstrapping a repeated measures ANOVA

2010-04-16 Thread Fischer, Felix
Thank you for your answer. Sorry for the missing example. In fact, i think, i solved the issue by some data-manipulations in the function. I splitted the data (one set for each measuring time), selected the cases at random, and then combined the two measuring times again. Results look

Re: [R] bootstrapping

2010-01-20 Thread aaron.foley
Subject: Re: [R] bootstrapping Hi Aaron, try the argument statistic=mean. Then boot() will give you the mean turn angle in your actual data (which appears to be 6 degrees, judging from what you write), as well as the means of the bootstrapped data. Then you can get (nonparametric) bootstrap

Re: [R] bootstrapping

2010-01-20 Thread David Winsemius
2010 00:04:59 +0100 From: stephan.kola...@gmx.de To: aaron.fo...@students.tamuk.edu CC: r-help@r-project.org Subject: Re: [R] bootstrapping Hi Aaron, try the argument statistic=mean. Then boot() will give you the mean turn angle in your actual data (which appears to be 6 degrees, judging from

Re: [R] bootstrapping

2010-01-20 Thread aaron.foley
Got it. Thanks CC: r-help@r-project.org From: dwinsem...@comcast.net To: aaron.fo...@students.tamuk.edu Subject: Re: [R] bootstrapping Date: Wed, 20 Jan 2010 10:34:20 -0500 On Jan 20, 2010, at 10:23 AM, aaron.fo...@students.tamuk.edu aaron.fo...@students.tamuk.edu wrote

Re: [R] bootstrapping

2010-01-19 Thread aaron.foley
Thanks all for your help! Aaron Date: Sat, 16 Jan 2010 00:04:59 +0100 From: stephan.kola...@gmx.de To: aaron.fo...@students.tamuk.edu CC: r-help@r-project.org Subject: Re: [R] bootstrapping Hi Aaron, try the argument statistic=mean. Then boot() will give you the mean turn angle

[R] bootstrapping

2010-01-15 Thread aaron.foley
Hi All, I'm new to R so please bear with me. I have a dataset with 337 turn angles ranging from -180 to 180 degrees. I need to bootstrap (sample with replacement) 1,000 times to create expected average turn angle with 95% CIs. The code is pretty straightforward (-boot(data =, statistic

Re: [R] bootstrapping

2010-01-15 Thread Stephan Kolassa
Hi Aaron, try the argument statistic=mean. Then boot() will give you the mean turn angle in your actual data (which appears to be 6 degrees, judging from what you write), as well as the means of the bootstrapped data. Then you can get (nonparametric) bootstrap CIs by

[R] bootstrapping a matrix using boot package

2010-01-09 Thread Amit
Dear All, I am trying to bootstrap a large data matrix 'exp' of dimension 9275x898 using package 'boot'. I am trying to calculate correlation of the obtained samples. I have done following so far: library(boot) load(ratio_exp.RData) #loading the data matrix dim(ratio_exp) [1] 9275 898

[R] bootstrapping a matrix and calculating Pearson's correlation coefficient

2010-01-05 Thread Lee William
Hi All, I have got matrix 'data' of dimension 22000x600. I want to make 50 independent samples of dimension 22000x300 from the original matrix 'data'. And then want to calculate pearsons CC for each of the obtained 50 matrices. It seems it is possible to do this using 'boot' function from library

Re: [R] bootstrapping a matrix and calculating Pearson's correlation coefficient

2010-01-05 Thread Liviu Andronic
Hello On 1/5/10, Lee William leeon...@gmail.com wrote: I have got matrix 'data' of dimension 22000x600. I want to make 50 independent samples of dimension 22000x300 from the original matrix 'data'. And then want to calculate pearsons CC for each of the obtained 50 matrices. It seems it is

[R] Bootstrapping in R

2009-12-09 Thread Trafim Vanishek
Dear all, I have some error trying to bootstrap from a matrix. The error message is Error in sample(n, n * R, replace = TRUE) : element 2 is empty; the part of the args list of '*' being evaluated was: (n, R) vv - c(0.5,3.2,5.4,1.1,1.4,1.2,2.3,2.0) Reg - matrix(data=vv, nrow = 4, ncol = 2)

Re: [R] Bootstrapping in R

2009-12-09 Thread Trafim Vanishek
I missed number of bootstrap replicates R boot(Reg, bootcoeff, R=10) but still it doesn't work Error in statistic(data, original, ...) : unused argument(s) (original) On Wed, Dec 9, 2009 at 2:46 PM, Trafim Vanishek rdapam...@gmail.com wrote: Dear all, I have some error trying to bootstrap

  1   2   >