similar to: parallel bootstrap linear model on multicore mac (re-post)

Displaying 20 results from an estimated 900 matches similar to: "parallel bootstrap linear model on multicore mac (re-post)"

2011 Feb 23
0
parallel bootstrap linear model on multicore mac
People of R(th), I have been ramming my head against this problem, and I wondered if anyone could lend a hand. I want to parallelize a bootstrap of a linear model on my 8-core mac. Below is the process that I want to parallelize (namely, the m2.ph.rlm.boot<-boot(m2.ph,m2.ph.fun, R = nboot) command). This is an extension of the bootstrapping linear models example in Venables and Ripley to
2012 Aug 09
0
RMySQL dbConnect issues
Hello, I have access to my database via command line and through workbench, and have access on the grant tables: mysql> SELECT host,user,password,select_priv,insert_priv FROM user; +------+-------+-------------------------------------------+-------------+-------------+ | host | user | password | select_priv | insert_priv |
2009 Jan 14
3
remove columns containing all zeros (or other value)
Hello- I would like to remove the columns of a matrix that contain all zeros. For example, from x<-matrix(c(1,5,3,2,1,4,0,0,0), ncol=3,nrow=3) I would like to remove the third column. However, because this is in a loop I need a way to first determine which columns are all zeros, and only then remove them. I.e., I don't know which column of x contains all zeros until after x is
2010 Jul 20
1
p-values pvclust maximum distance measure
Hi, I am new to clustering and was wondering why pvclust using "maximum" as distance measure nearly always results in p-values above 95%. I wrote an example programme which demonstrates this effect. I uploaded a PDF showing the results Here is the code which produces the PDF file: ------------------------------------------------------------------------------------- s <-
2010 Aug 25
2
Problem with clusterCall, "Error in checkForRemoteErrors(lapply(cl, recvResult)) : "
Hi all, I am trying to use snow package to do a parallel MCMC. I have read a few guides and articles, the following is that I came up with. When I run it I got the error message: Error in checkForRemoteErrors(lapply(cl, recvResult)) : 4 nodes produced errors; first error: could not find function "ui.Next" The data is a longitudinal data with few repeated readings on a number of
2007 Nov 01
1
loops & sampling
Hi, I'm new to R (and statistics) and my boss has thrown me in the deep-end with the following task: We want to evaluate the impact that sampling size has on our ability to create a robust model, or evaluate how robust the model is to sample size for the purpose of cross-validation i.e. in our current project we have collected a series of independent data at 250 locations, from which
2012 Jan 19
1
snow - bootstrapped correlation ranking
I wonder if someone could help me adjusting the following code to parallelized snow code: #Creating a data set (not needed to be parallel) n<-100 p<-100 x<-matrix(rnorm(n*p),p) y<-rnorm(n) # Bootstrapping nboot<-1000 alpha<-0.05 rhoboot <- array(0, dim=c(p,nboot)) bootranks <- array(0, dim=c(p,nboot)) bootsamples <- array( floor(runif(n*nboot)*n+1), dim=c(n,nboot)) for
2009 Feb 02
1
sem package and AMOS
Hello- I am using R to build my initial models, but need to use AMOS to compare the models of two groups (adults vs. kids). The problem is I am getting different results with R and AMOS for the initial models of the separate groups (and the R results make more sense). The parameter estimates (path coefficients and variances) from both programs are nearly identical, but the model chi-squares
2009 Jan 06
1
R SEM package
Does anyone know if the sem package in R can implement a stacked model comparison, for example as in LISREL or AMOS? Thanks, Anthony -- Anthony Steven Dick, Ph.D. Post-Doctoral Fellow Human Neuroscience Laboratory Department of Neurology The University of Chicago 5841 S. Maryland Ave. MC-2030 Chicago, IL 60637 Phone: (773)-834-7770 Email: adick at uchicago.edu Web:
2009 Jan 26
1
sem package: start values
Hello- If I input a variance-covariance matrix and specify NA for start values, how does sem determine the start value? Is there a default? Anthony -- Anthony Steven Dick, Ph.D. Post-Doctoral Fellow Human Neuroscience Laboratory Department of Neurology The University of Chicago 5841 S. Maryland Ave. MC-2030 Chicago, IL 60637 Phone: (773)-834-7770 Email: adick at uchicago.edu Web:
2010 May 25
1
SEM interaction
Hello all, This is a general stats question--I realize it is an R help list, so tell me to go away if it is inappropriate. I have a 2 X 2 design, and I have specified four identical path models (one for each level of each factor). I want to test for an interaction at each path--essentially (A1 - A2) - (B1 - B2) != 0. I was thinking of computing a contrast for each path of interest, such that
2018 May 22
0
Bootstrap and average median squared error
Hello, If you want to bootstrap a statistic, I suggest you use base package boot. You would need the data in a data.frame, see how you could do it. library(boot) bootMedianSE <- function(data, indices){ d <- data[indices, ] fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d) ypred <- predict(fit) y <- d$crp median(y - ypred)^2 } dat <-
2018 May 21
2
Bootstrap and average median squared error
Dear R-experts, I am trying to bootstrap (and average) the median squared error evaluation metric for a robust regression. I can't get it. What is going wrong ? Here is the reproducible example. ############################# install.packages( "quantreg" ) library(quantreg) crp <-c(12,14,13,24,25,34,45,56,25,34,47,44,35,24,53,44,55,46,36,67) bmi
2011 Apr 03
2
:HELP
Hello, &nbsp; I want to sum first three terms of each column of matrix. But I don't calculate with "apply" function. &nbsp; skwkrt&lt;-function(N=10000,mu=0,sigma=1,n=100, nboot=1000,alpha=0.05){ x&lt;-rnorm(N,mu,sigma)#population samplex&lt;-matrix(sample(x,n*nboot,replace=T),nrow=nboot) #... } &nbsp; is that: suppose a is a 5x2 matrix. &nbsp;a={1,2,3,4,5
2008 Dec 03
1
help on tapply using sample with differing sample-sizes
Hello, My question likely got buried so I am reposting it in the hopes that someone has an answer. I have thought more about the question and modified my question. I hope tha my specific question is: I am attempting to create a bootstrap procedure for a finite sample using the theory of Rao and Wu, JASA (1988) that replicates within each strata (h) n_h - 1 times. To this end, I require a
2011 May 16
1
Matrix manipulation in for loop
Hi all, I have a problem with getting my code to do what I want! This is the code I have: create.means.one.size<-function(nsample,var,nboot){ mat.x<-matrix(0,nrow=nboot,ncol=nsample) for(i in 1:nboot){ mat.x[i,]<-sample(var,nsample,replace=T) } mean.mat<-rep(0,nboot) for(i in 1:nboot){ mean.mat[i]<-mean(mat.x[i,]) } sd.mean<-sd(mean.mat) return(mean.mat) } where
2005 Jun 23
1
errorest
Hi, I am using errorest function from ipred package. I am hoping to perform "bootstrap 0.632+" and "bootstrap leave one out". According to the manual page for errorest, i use the following command: ce632[i]<-errorest(ytrain ~., data=mydata, model=lda, estimator=c("boot","632plus"), predict=mypredict.lda)$error It didn't work. I then tried the
2012 Nov 14
2
error data frame
Hallo everybody! I am trying to perform a TiTAN (Baker & King 2010) analysis with R 2.14.1. I have come that far: h89Abund <- read.csv("Fish89Abund.csv") > names (Fish89Abund) [1] "StationCode" "Abramisbrama" "Alburnoidesbipunctatus" "Alburnusalburnus" [5] "Ameiurusmelas" >
2019 Jun 02
3
Incluir un rango de varias variables explicativas a un modelo
Hola, Quiero especificar una ecuación con varias variables explicativas de una manera eficiente sin necesidad de escribir todas y cada una. Tengo un conjunto de variables (junto con otras) dentro de una base de datos que se llaman pot23 pot311 pot312 pot 316 pot317........... pot80. No necesariamente están secuenciadas. Quisiera saber cómo indicar que incluya todas las variables de pot23 a pot80
2009 Nov 19
2
Problem with zoo and BootPR packages
Hi, I'm trying to plot the forecasts I generated using the Plot.Fore function of the BootPR package. But I got an error from zoo: My data: Time Series: Start = 1 End = 18 Frequency = 1 [1] 38731 38628 39117 92809 71984 31226 58613 72360 107956 92066 [11] 95208 99098 95848 120383 110717 105680 98469 101916 Script: y1<-ts(y1);