similar to: Loop elimination question

Displaying 20 results from an estimated 4000 matches similar to: "Loop elimination question"

2006 Jul 21
0
[Fwd: Re: Parameterization puzzle]
Bother! This cold has made me accident-prone. I meant to hit Reply-all. Clarification below. -------- Original Message -------- Subject: Re: [R] Parameterization puzzle Date: Fri, 21 Jul 2006 19:10:03 +1200 From: Murray Jorgensen <maj at waikato.ac.nz> To: Prof Brian Ripley <ripley at stats.ox.ac.uk> References: <44C063E5.3020703 at waikato.ac.nz>
2004 May 24
2
Month names
This is how I get the month names from within R: > mon <- rep(strptime("01/01/1952", format = "%d/%m/%Y"), 12) > mon$mon <- mon$mon + 0:11 > mnam <- months(mon, abbreviate = F) > mnam [1] "januar" "februar" "marts" "april" "maj" "juni" "juli" "august"
2000 Aug 20
1
Best subsets regression
Hi all, has anyone written a function to do "best subsets" regression similar to the Minitab command? Regards, Murray Jorgensen Murray Jorgensen, Department of Statistics, U of Waikato, Hamilton, NZ -----[+64-7-838-4773]---------------------------[maj at waikato.ac.nz]----- "Doubt everything or believe everything:these are two equally convenient strategies. With either we
1999 Jul 16
0
Randomization tests
Please excuse this request from a beginner. I'm teaching an introductory module on experimental design and I want to illustrate the idea of tests based on the randomization distribution. If anyone has written any R code to do a randomization test in a particular example I'd be very grateful if you could show me your code. Murray Jorgensen Murray Jorgensen, Department of Statistics,
2001 May 22
2
MASS data sets
I'm running R 1.2.2 under windows 98 on a Pentium 133 laptop. I can't seem to retrieve the package MASS data sets: > library(MASS) > data(wtloss) Warning message: Data set `wtloss' not found in: data(wtloss) > data(abbey) Warning message: Data set `abbey' not found in: data(abbey) And yet all the .rda files for the MASS datasets are in D:\Program
2003 Jan 12
1
likelihood and score interval estimates for glms
G'day list! I'm thinking about programming likelihood and score intervals for generalized linear models in R based on the paper "On the computation of likelihood ratio and score test based confidence intervals in generalized linear models" by Juha Alho (1992) (Statistics in Medicine, 11, 923-930). Being lazy, I thought that I would ask if anyone else on the list has
2006 Jun 05
1
Extracting Variance components
I can ask my question using and example from Chapter 1 of Pinheiro & Bates. > # 1.4 An Analysis of Covariance Model > > OrthoFem <- Orthodont[ Orthodont$Sex == "Female", ] > fm1OrthF <- + lme( distance ~ age, data = OrthoFem, random = ~ 1 | Subject ) > summary( fm1OrthF ) Linear mixed-effects model fit by REML Data: OrthoFem AIC BIC
2008 Mar 02
2
Recommended Packages
Having just update to R 2.6.2 on my old Windows laptop I notice that the number of packages is growing exponentially and my usual approach of get-em-all may not be viable much longer. Has any thought been given to dividing "contributed" binaries into a recommended set, perhaps a couple of hundred, and the remained. That way one could install the recommended ones routinely and add in
2002 Oct 28
2
Combining simulation results
In one saved workspace I have the results of a simulation experiment stored as an array "resarray". > dim(resarray) [1] 10 6 500 3 In another workspace I have a similar array from another run of the simulation. I want to combine the two arrays into a single array of dimensions 10, 6, 1000, 3 What's the best way to do this? Murray Jorgensen Dr Murray Jorgensen
2006 Nov 13
2
A printing "macro"
I am exploring the result of clustering a large multivariate data set into a number of groups, represented, say, by a factor G. I wrote a function to see how categorical variables vary between groups: > ddisp <- function(dvar) { + csqt <- chisq.test(G,dvar) + print(csqt$statistic) + print(csqt$observed) + print(round(csqt$expected)) + round(csqt$residuals) + } > > x
2003 Sep 17
5
Quit asking me if I want to save the workspace!
How do you stop R from putting up a dialog box when you quit Rgui? (I use Windows and I never save workspaces that way) Murray -- Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: maj at waikato.ac.nz Fax 7 838 4155 Phone +64 7 838 4773 wk +64 7 849 6486 home
2006 May 02
0
Pasting data into scan() - oops!
I forgot to mention that I am using Windows XP. -------- Original Message -------- Subject: Pasting data into scan() Date: Tue, 02 May 2006 11:55:03 +1200 From: Murray Jorgensen <maj at stats.waikato.ac.nz> To: r-help at stat.math.ethz.ch The file TENSILE.DAT from the Hand et al "Handbook of Small Data Sets" looks like this: [...] -- Dr Murray Jorgensen
2001 Sep 18
2
Error mean square
If rb.lm is an lm-object, I can access the error mean square as s2 <- sum(rb.lm$residuals^2)/rb.lm$df.residual This seems a bit like hard work for such a commonly wanted quantity. Is there a better way to do this? Murray Jorgensen Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: maj at
2005 Sep 08
1
Coarsening Factors
It is not uncommon to want to coarsen a factor by grouping levels together. I have found one way to do this in R: > sites [1] F A A D A A B F C F A D E E D C F A E D F C E D E F F D B C Levels: A B C D E F > regions <- list(I = c("A","B","C"), II = "D", III = c("E","F")) > library(Epi) > region <-
2009 Nov 25
2
R or C++ on FreeNX servers
Hi all, I have just found out that the machine learning group in our Faculty has a lot of spare capacity on their FreeNX servers. I do not know a lot about these beasts but I understand that they are a free version of something produced by a firm called "NoMachine". They are designed for executing parallel algorithms and I thought that they might be of use in a project of mine
2010 Jun 14
2
Html help
I have just installed R 2.11.1 on my XP laptop. I like html help for browsing but text help for on-the-fly look-ups. I was a bit surprised when I was asked to choose between them during the installation. I chose text, thinking I could fix the html help later, which is what I am trying to do now. Now when I ask for html help my browser goes to 'http://-ip-number-/doc/html/index.html'
2003 Sep 23
2
R-project [.com?] [.net?]
I got a shock a few days ago when I accidentally visited www.r-project.com . I thought that the r-project site had been hacked until I realised my mistake. There is also a site www.r-project.net. Both of these sites appear to be Japanese. Does anyone know anything about them? I suppose that it is not unusual for names close to those of popular sites to be used. It is good that they use a
2000 Oct 11
0
Balanced incomplete block analysis
At 07:12 AM 10-10-00 +0100, Prof Brian D Ripley wrote: >On Tue, 10 Oct 2000, Murray Jorgensen wrote: > >> Excuse me everyone, but I don't have to teach this very often! >> >> Has anyone got some R code for doing adjusted treatment means and the >> recovery of inter-block information in the analysis of balanced incomplete >> block designs? > >Do you
2003 Aug 20
5
Interlacing two vectors
I want to interlace two vectors. This I can do: > x <- 1:4 > z <- x+0.5 > as.vector(t(cbind(x,z))) [1] 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 but this seems rather inelegant. Any suggestions? Murray -- Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: maj at waikato.ac.nz
2002 Dec 03
2
Array multiplication
I wanted a sort of matrix product of an array and a matrix. As there does not seem to be any array multiplication apart from outer() I proceeded as follows: lambda <- array(0, c(n,m,d)) # stuff omitted # zed is an n by m matrix # # \lamb.star_{ik} lamb.star <- matrix(0, nrow=n, ncol=d) for (i in 1:n) { for (k in 1:d) { for (j in 1:m) { lamb.star[i,k] = lamb.star[i,k] +