similar to: How to repeat a procedure

Displaying 20 results from an estimated 5000 matches similar to: "How to repeat a procedure"

2004 Feb 10
1
generate random sample from ZINB
I want to generate 1,000 random samples of sample size=1,000 from ZINB. I know there is a rnegbin() to generate random samples from NB, and I know I can use the following process: do i=1 to 1000 n=0 do i=1 to 1000 if runi(1)>0.1 then x(i) = 0; else x(i)=rnegbin(); n=n+1; if n>1000 then stop; end; output; end; Anybody can help me out with the R code? Thanks very much ahead of time.
2004 Mar 26
3
regression problem
i need to know how to estimate a linear regression whose coefficients sum to zero
2011 Mar 23
9
WEBrick, Passenger or Mongrel
Hi, My organization is going to set up puppet soon. We have thousands servers and desktops. Would WEBrick work well for this? Or should we use Passenger? Thanks, Haiyan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to
2012 Feb 13
3
mgcv: increasing basis dimension
hi Using a ts or tprs basis, I expected gcv to decrease when increasing the basis dimension, as I thought this would minimise gcv over a larger subspace. But gcv increased. Here's an example. thanks for any comments. greg #simulate some data set.seed(0) x1<-runif(500) x2<-rnorm(500) x3<-rpois(500,3) d<-runif(500) linp<--1+x1+0.5*x2+0.3*exp(-2*d)*sin(10*d)*x3
2007 Feb 28
3
matrix manipulations
Dear friends, I have a basic question with R. I'm generating a set of random variables and then combining them using the cbind statement. The code for that is given below. for (i in 1:100) { y <- rpois(i,lambda=10) X0 <- seq(1,1,length=i) X1 <- rnorm(i,mean=5,sd=10) X2 <- rnorm(i,mean=17,sd=12) X3 <- rnorm(i,mean=3, sd=24) ind <- rep(1:5,20) }
2003 Mar 07
5
Moving average
Hi, Does anyone know if R has the functionality to calculate a simple moving average. I cant seem to find it in the help menu. thanks, Wayne Dr Wayne R. Jones Statistician / Research Analyst KSS Group plc St James''s Buildings 79 Oxford Street Manchester M1 6SS Tel: +44(0)161 609 4084 Mob: +44(0)7810 523 713 KSS Ltd A division of Knowledge Support Systems Group plc Seventh
2003 Mar 28
4
Testing for randomness
Dear all, Is there a test in R for the randomness of a sequence of observations (e.g. to test the random number generator)? Specifically I am looking for autocorrelations which are not necessarily linear in nature, which the acf function does not seem to be flexible enough to detect as it tests for linear autocorrelation. Thanks in advance, Paul.
2004 Jul 19
5
converting character strings to eval
Hi there fellow R-users, I'm stuck on this seemingly trivial problem. All I want to coerce a character string into a command. For example: x<-rnorm(20) y<-rnorm(20) str<-"lm(y~x)" I want to evaluate the "str" command. I have tried eval(as.expression(str)) But it doesn't seem to work. I am aware of the call command, but for reasons I won't go
2004 Jun 09
3
market-basket analysis in R
Hi there fellow R-users, Does anyone know if there exists a package for associated rules data mining (market basket analysis) in R. I have tried searching CRAN but with no luck. Regards Wayne KSS Ltd Seventh Floor St James's Buildings 79 Oxford Street Manchester M1 6SS England Company Registration Number 2800886 Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305
2006 Mar 24
1
unable to start device JPEG in linux
r-help?? When I want to use jpeg() in R-2.1.1 which is installed in linux platform to generate a jpeg file, the error occurs as following: > jpeg() Error in X11(paste("jpeg::", quality, ":", filename, sep = ""), width, : unable to start device JPEG In addition: Warning message: unable to open connection to X11 display '' > capabilities()
2003 Nov 19
2
Correction for first order autocorrelation in OLS residuals
Hi there fellow R-users, Can anyone tell me if there exits an R package that deals with serial correlation in the residuals of an lm model. Perhaps, using the Cochrane Orcutt or Praise Wilson methods? Thanks, Wayne Dr Wayne R. Jones Senior Statistician / Research Analyst KSS Limited St James's Buildings 79 Oxford Street Manchester M1 6SS Tel: +44(0)161 609 4084 Mob: +44(0)7810 523 713
2006 Jan 18
1
compiling R on powerpc-ibm-aix5.1.0.0
r-help仯伂 I am trying to compile R on an powerpc-IBM-AIX5.1.0.0 machine, Is R suitable to be used in this system? The R Installation and Administration document mentioned rs6000-ibm-aix not powerpc-IBM-AIX5.1.0.0 . When I tried to compile R.2.2.0 in powerpc-IBM-AIX5.1.0.0 using the following steps: (1) ./configure There is an error message :configure: error: --with-readline=yes
2004 Oct 04
7
Strange Matrix Multiplication Behaviour
Hi there fellow R-users, Im seeing some strange behaviour when I multiply a vector by a matrix Here is my script: > tr 1 2 3 4 5 6 0.2217903 0.1560525 0.1487908 0.1671354 0.1590643 0.1471667 > > ex1 a b c d e f 1 0.2309579 -3.279045 -0.6694697 -1.1024404 0.2303928 -1.5527404 2
2010 Nov 27
1
return vector of element names for vector, matrix or array
Just as as.vector() takes a vector, matrix or array and returns a vector in row-major order, I'd like to write a function to take such an object and return the dimension names, pasted with some separator, as a similar vector. Here is something ugly cobbled together to demonstrate what I want: a function to work for any number of dimensions. vecnames <- function(x, sep=':') {
2003 Apr 17
2
Testing for Stationarity of time series
Hi there, Does anyone know if R has a function for testing whether a time series is stationary?? Thanks in advance, Wayne Dr Wayne R. Jones Statistician / Research Analyst KSS Group plc St James's Buildings 79 Oxford Street Manchester M1 6SS Tel: +44(0)161 609 4084 Mob: +44(0)7810 523 713 KSS Ltd A division of Knowledge Support Systems Group plc Seventh Floor St James's
2003 Sep 02
2
FW: Creating a Package with Windows XP.
> Hi there fellow R-Users, > > I am trying to use the "package.skeleton" to create my own package with > R.1.7.1 on Windows XP Professional. > I have followed the package.skeleton example and have downloaded the > necessary files found at http://www.stats.ox.ac.uk/pub/Rtools/tools.zip. > > and perl5, available via
2003 Sep 04
3
: RODBC column length>255
Hello there fellow R-users, I am using the RODBC functionality to query a database. I am trying to read in a columns of strings which have a character field lengths greater than 255. The data.frame that I recieve back from the RODBC query only contains the first 255 characters (the rest having been truncated). Any help on how to solve this problem would be greatly appreciated. Reagrds Wayne
2011 Mar 20
4
predicting values from multiple regression
Hey List, I did a multiple regression and my final model looks as follows: model9<-lm(calP ~ nsP + I(st^2) + distPr + I(distPr^2)) Now I tried to predict the values for calP from this model using the following function: xv<-seq(0,89,by=1) yv<-predict(model9,list(distPr=xv,st=xv,nsP=xv)) The predicted values are however strange. Now I do not know weather just the model does not fit
2004 Feb 12
1
Almost Ideal Demand System
Hi there fellow R users, Has anyone got an R example of applying an Ideal demand system, possibly using the library systemfit?? Thanks Wayne Dr Wayne R. Jones Senior Statistician / Research Analyst KSS Limited St James's Buildings 79 Oxford Street Manchester M1 6SS Tel: +44(0)161 609 4084 Mob: +44(0)7810 523 713 KSS Ltd Seventh Floor St James's Buildings 79 Oxford Street
2003 Apr 03
1
Na handing with time series objects
Hello All, Does anyone out there know a way to decompose time series objects with missing values. A simple "na.omit" will not work since it does not preserve the time differences between succesive observations. Thanks in advance, Wayne Dr Wayne R. Jones Statistician / Research Analyst KSS Group plc St James''s Buildings 79 Oxford Street Manchester M1 6SS Tel: +44(0)161