Re: [R] Doing pairwise comparisons using either Duncan, Tukey or LSD

2009-02-19 Thread Kingsford Jones
try: example(TukeyHSD) hth, Kingsford Jones On Thu, Feb 19, 2009 at 9:51 AM, Saeed Ahmadi ahmadi_sa...@yahoo.com wrote: Hi, I have a basic and simple question on how to code pairwise (multiple) mean compariosn between levels of a factor using one of the Duncan, Tukey or LSD. Thanks

Re: [R] Ideal (possible) configuration for an exalted R system

2009-02-16 Thread Kingsford Jones
before we see such memory in laptops: http://www.ubergizmo.com/15/archives/2009/01/samsung_opens_door_to_32gb_ram_stick.html Like you, I'd also be interested in hearing about configurations folks have used to work w/ large datasets. hth, Kingsford Jones On Mon, Feb 16, 2009 at 5:10 AM

Re: [R] Problems in Recommending R

2009-02-12 Thread Kingsford Jones
On Thu, Feb 12, 2009 at 3:12 PM, Johannes Huesing johan...@huesing.name wrote: Last time I tried, rseek.org yielded no results when searching for inferno. ...although, if you hit the 'Support Lists' tab it finds the thread in which Patrick announced it. -- Johannes Hüsing

Re: [R] Linear model

2009-02-11 Thread Kingsford Jones
is printed vs what is stored iv) see http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f v) rather than subtracting from 1, use the 'lower.tail' argument to pt: 2*pt(10.843,2838,lower=F) [1] 7.185635e-27 hth, Kingsford Jones G-lm(y~x1+x2+x3+x4+x5

Re: [R] Help regarding White's Heteroscedasticity Correction

2009-02-10 Thread Kingsford Jones
or simultaneously estimate the coefficients and variance structure via nlme::gls and its 'weights' argument... On Tue, Feb 10, 2009 at 7:57 AM, John Fox j...@mcmaster.ca wrote: Dear Kishore, Yes, White's heteroscedasticity-consistent standard errors are just that -- standard errors for the

Re: [R] What is the R equivalent of STATA's 'drop' command?

2009-02-09 Thread Kingsford Jones
See ?[ and its examples Also, section 2.7 of An Introduction to R is a good place to start: http://cran.r-project.org/doc/manuals/R-intro.html#Index-vectors hth, Kingsford Jones On Mon, Feb 9, 2009 at 5:27 PM, jjh21 jjhar...@gmail.com wrote: Hello, I am trying to do some data cleaning

Re: [R] Introduction to maps (of Denmark)?

2009-02-06 Thread Kingsford Jones
Also, see this page for more ideas on mapping an auxiliary variable by county: http://r-spatial.sourceforge.net/gallery/ (e.g. plots 9, 14, 15 and 21) Kingsford Jones On Fri, Feb 6, 2009 at 3:22 PM, Greg Snow greg.s...@imail.org wrote: Googling for Denmark Shapefile leads to this website

Re: [R] Matlab inv() and R solve() differences

2009-01-29 Thread Kingsford Jones
,] 1.000 0.9963557 -0.9883690 0.8548065 [2,] 0.9963557 1.000 -0.9976663 0.8084090 [3,] -0.9883690 -0.9976663 1.000 -0.7663847 [4,] 0.8548065 0.8084090 -0.7663847 1.000 kappa(x) [1] 2813.326 hth, Kingsford Jones On Thu, Jan 29, 2009 at 7:00 PM, Joseph P Gray jpg...@uwm.edu wrote

Re: [R] Correlation matrix one side with significance

2009-01-25 Thread Kingsford Jones
On the topic of visualizing correlation, see also Murdoch, D.J. and Chow, E.D. (1996). A graphical display of large correlation matrices. The American Statistician 50, 178-180. with examples here: # install.packages('ellipse') example(plotcorr, package='ellipse') On Sat, Mar 8, 2008 at 3:01

Re: [R] Omitting a desired line from a table [Beginner Question]

2009-01-25 Thread Kingsford Jones
see ?subset Or use indexing, which is covered in section 2.7 of an introduction to R (but note that a data frame has 2 dimensions) hth, Kingsford Jones On Sun, Jan 25, 2009 at 3:06 PM, pfc_ivan pfc_i...@hotmail.com wrote: I am a beginner using this R software and have a quick question. I

Re: [R] comparing the previous and next entry of a vector to a criterium

2009-01-25 Thread Kingsford Jones
How about: a - c(1,2,3,3,2,1,6,3,2) b - c(NA,a[-length(a)]) c - c(a[-1],NA) a[b==1 c==3] [1] 2 6 hth, Kingsford Jones On Sun, Jan 25, 2009 at 3:02 PM, Jörg Groß jo...@licht-malerei.de wrote: Hi, I have a quit abstract problem, hope someone can help me here. I have a vector like

Re: [R] predict function problem for glmmPQL

2009-01-22 Thread Kingsford Jones
with predict function or it's some bug in my code? ...perhaps the levels of 'sample' differ between 'traindata' and 'testdata'? hth, Kingsford Jones Thanks much for your help! Chun Chun Zhang Statistician at Roche __ R-help@r-project.org mailing list

Re: [R] Joint significance of more regressors in summary

2009-01-21 Thread Kingsford Jones
try install.packages('car') ?car::linear.hypothesis hth, Kingsford Jones On Wed, Jan 21, 2009 at 4:20 PM, Roberto Patuelli roberto.patue...@lu.unisi.ch wrote: Dear All, I was wondering if it is possible to generate a regression summary (it does not matter at this stage if from an lm

Re: [R] I'm looking for a book about spatial point patterns (Diggle, 2003)

2009-01-11 Thread Kingsford Jones
Unangu, If you haven't seen the 200pg workshop notes that Adrian Baddeley has made available from his spatstat webpage, I highly recommend them: http://www.csiro.au/files/files/pn0y.pdf hth, Kingsford Jones On Sat, Jan 10, 2009 at 9:04 PM, Unangu una...@gmail.com wrote: To understand some

[R] R, clinical trials and the FDA

2009-01-11 Thread Kingsford Jones
I hope that Marc doesn't mind, but I felt that part of his recent post was important enough to deserve it's own subject line rather then being lost in a 60-msg-long thread... On Sun, Jan 11, 2009 at 10:08 AM, Marc Schwartz marc_schwa...@comcast.net wrote: ... I strongly believe that the

Re: [R] R in the NY Times

2009-01-10 Thread Kingsford Jones
accept work done in R, and b) SAS is the only way to effectively handle data? best, Kingsford Jones On 7 Jan, 14:50, Marc Schwartz marc_schwa...@comcast.net wrote: on 01/07/2009 08:44 AM Kevin E. Thorpe wrote: Zaslavsky, Alan M. wrote: This article is accompanied by nice pictures

Re: [R] install.views()

2009-01-10 Thread Kingsford Jones
did you install and load the 'ctv' package? install.packages('ctv') library('ctv') then try your code... Kingsford Jones On Sat, Jan 10, 2009 at 1:00 PM, oscar linares wins...@gmail.com wrote: Dear Rxperts, Using R 2.8.1 and trying install.views(Cluster) getting error Error: could

Re: [R] Matrix: Problem with the code

2009-01-09 Thread Kingsford Jones
,]6 36216 [11,] 91 8281 753571 [12,] 41 1681 68921 [13,] 22 484 10648 [14,]39 27 best, Kingsford Jones So I think the code below it, although not too short, does what the person asked. Thanks though because I understand outer better now. temp - matrix(c

Re: [R] New York Times Article: Data Analysts Captivated by R's Power

2009-01-07 Thread Kingsford Jones
software that can help illuminate data trends more clearly blah blah blah blah ;-) Kingsford Jones http://www.flickr.com/photos/sluggerotoole/153603564/ Simon. -- Simon Blomberg, BSc (Hons), PhD, MAppStat. Lecturer and Consultant Statistician Faculty of Biological and Chemical Sciences

Re: [R] the first and last observation for each subject

2009-01-05 Thread Kingsford Jones
$version.string [1] R version 2.8.0 (2008-10-20) Kingsford Jones On Mon, Jan 5, 2009 at 10:18 AM, William Dunlap wdun...@tibco.com wrote: Arg, the 'sapply(...)' in the function was in the initial comment, gm - function(x, group){ # medians by group: sapply(split(x,group),median) but someone's

Re: [R] the first and last observation for each subject

2009-01-05 Thread Kingsford Jones
126.630.42 129.21 gm user system elapsed 37.560.84 38.78 sapply/gm user ratio: 3.371406 On Mon, Jan 5, 2009 at 2:37 PM, Kingsford Jones kingsfordjo...@gmail.com wrote: Here's some more timing's of Bill's function. Although in this example sapply has a clear performance advantage

Re: [R] Basic Question about use of R

2009-01-02 Thread Kingsford Jones
rather than analysis. R in combination with a GIS is really the way to go. Here is a current book that covers many of the spatial tools available in R http://www.springer.com/public+health/epidemiology/book/978-0-387-78170-9 hope that helps, Kingsford Jones this kind of study? Thank you

Re: [R] Spatial Data Analysis in R [was: Basic Question about use of R]

2009-01-02 Thread Kingsford Jones
resending to provide a more informative subject line On Fri, Jan 2, 2009 at 3:21 PM, Kingsford Jones kingsfordjo...@gmail.com wrote: Hi David, A general answer to your question is: yes, R would be useful for such analyses - particularly when interfaced with a GIS. For an introduction

Re: [R] interpretation of conf.type in predict.Design {Design}

2009-01-01 Thread Kingsford Jones
repeated sampling the fitted line will vary less than the observed y values at any given set of x-values, and this is reflected in the fact that the confidence interval is narrower than the prediction interval. hth, Kingsford Jones On Wed, Dec 31, 2008 at 2:15 PM, Dylan Beaudette dylan.beaude

Re: [R] How to display y-axis labels in Multcomp plot

2008-12-08 Thread Kingsford Jones
(4,8,4,2)) plot(confint(mult)) hth, Kingsford Jones On Mon, Dec 8, 2008 at 5:06 PM, Metconnection [EMAIL PROTECTED] wrote: Dear R-users, I'm currently using the multcomp package to produce plots of means with 95% confidence intervals i.e. mult-glht(lm(response~treatment, data=statdata

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread Kingsford Jones
[48,] D E C [49,] E A B [50,] E A C [51,] E A D [52,] E B A [53,] E B C [54,] E B D [55,] E C A [56,] E C B [57,] E C D [58,] E D A [59,] E D B [60,] E D C Kingsford Jones On Tue, Dec 2, 2008 at 9:41 PM, G. Jay Kerns [EMAIL PROTECTED] wrote: Dear Brandon, On Tue, Dec

Re: [R] function for simultaneous confidence interval of regression coefficients

2008-11-30 Thread Kingsford Jones
see ?coef # extract the estimates ?vcov # extract their covariance matrix ?qf # get the F quantile of interest Also, you may be interested in ?car::ellipse ?ellipse::ellipse.lm ?gmodels::glht.test hth, Kingsford Jones On Sat, Nov 29, 2008 at 4:30 PM, Kyle Matoba [EMAIL PROTECTED] wrote

Re: [R] how to select cases based on value of one or more variables

2008-11-30 Thread Kingsford Jones
[students$Sex == 1]) hth, Kingsford Jones On Sun, Nov 30, 2008 at 2:15 PM, Simone Gabbriellini [EMAIL PROTECTED] wrote: sorry for my bad presentation... read.spss gives me this: students $Auno [1] 6 1 2 2 1 3 4 2 4 2 4 4 1 1 NA 1 4 2 1 1 1 5 4 [24] 2 1 2 1 2 1

Re: [R] AIC function and Step function

2008-11-30 Thread Kingsford Jones
weights because you didn't specify any through the weights argument to lm. If you had, you could extract them using the same technique used in the above code: w - mod.fit$weights hth, Kingsford Jones Thanks for your time and kind help! Dana Steven McKinney wrote: Hi Dana, Many

Re: [R] aov help

2008-11-13 Thread Kingsford Jones
include working with unbalanced data, not producing negative variance estimates when the MS_{error} is larger than the MS_{between groups}, and providing a great deal of flexibility in structuring both the random effects and error covariance matrices. hth, Kingsford Jones On Thu, Nov 13, 2008 at 7

Re: [R] VEC Operator in R

2008-10-23 Thread Kingsford Jones
RSiteSearch('vec vech', restrict = 'fun') turns up several packages with vec and vech functions. E.g., matrixcalc, fUtilities, ks, ... hth, Kingsford Jones On Thu, Oct 23, 2008 at 11:47 AM, megh [EMAIL PROTECTED] wrote: Can anyone please tell whether there is any R function to act as VEC

Re: [R] Calculating confidence limits for the difference between means

2008-10-23 Thread Kingsford Jones
-level factor and covar is quantitative confint(fit, level = .90) hth, Kingsford Jones I suspect that several participants in this board have implemented code to so this. I hope that someone is willing to share the code. Thanks in advance. Dennis Dennis Fisher MD P (The P Less Than

Re: [R] VEC Operator in R

2008-10-23 Thread Kingsford Jones
your system. Thank You. ---BeginMessage--- RSiteSearch('vec vech', restrict = 'fun') turns up several packages with vec and vech functions. E.g., matrixcalc, fUtilities, ks, ... hth, Kingsford Jones On Thu, Oct 23, 2008 at 11:47 AM, megh [EMAIL PROTECTED] wrote: Can anyone please tell whether

Re: [R] VEC Operator in R

2008-10-23 Thread Kingsford Jones
your system. Thank You. ---BeginMessage--- RSiteSearch('vec vech', restrict = 'fun') turns up several packages with vec and vech functions. E.g., matrixcalc, fUtilities, ks, ... hth, Kingsford Jones On Thu, Oct 23, 2008 at 11:47 AM, megh [EMAIL PROTECTED] wrote: Can anyone please tell whether

Re: [R] Calculating confidence limits for the difference betweenmeans

2008-10-23 Thread Kingsford Jones
in two means using an ANCOVA perhaps something like... fit - lm(y ~ trt + covar) # trt is a 2-level factor and covar is quantitative confint(fit, level = .90) hth, Kingsford Jones I suspect that several participants in this board have implemented code to so this. I hope that someone is willing

Re: [R] Calculating confidence limits for the difference betweenmeans

2008-10-23 Thread Kingsford Jones
in two means using an ANCOVA perhaps something like... fit - lm(y ~ trt + covar) # trt is a 2-level factor and covar is quantitative confint(fit, level = .90) hth, Kingsford Jones I suspect that several participants in this board have implemented code to so this. I hope that someone is willing

Re: [R] Ecological Niche Modelling on R

2008-10-08 Thread Kingsford Jones
package (although it does not appear to be on CRAN). hth, Kingsford Jones Regards a lot. Savava. Miltinho Astronauta Brazil On Wed, Oct 8, 2008 at 6:02 AM, Clément Calenge [EMAIL PROTECTED] wrote: It's very kind of Stephen to plug my book, but it's notwhat you're looking

Re: [R] lme and lmer df's and F-statistics again

2008-10-07 Thread Kingsford Jones
You may find this site useful: http://lme4.r-forge.r-project.org/bib/lme4bib.html On Tue, Oct 7, 2008 at 9:08 AM, Dieter Menne [EMAIL PROTECTED] wrote: Julia S. julia.schroeder at gmail.com writes: Now, I did that in my article and I got a response from a reviewer that I additionally should

Re: [R] ANOVA between within variance

2008-09-27 Thread Kingsford Jones
to be useful (formulas for crossed random effects are much more straightforward than in nlme). If not, this page provides some helpful tips on eliciting useful responses from this list: http://www.r-project.org/posting-guide.html HTH, Kingsford Jones On Sat, Sep 27, 2008 at 2:21 AM, Gregor

Re: [R] Bug in is ?

2008-09-25 Thread Kingsford Jones
is looking for the 'typeof' page. Or even example(type) Also, after a brief introduction, the R Language Definition document begins with a discussion of types. Kingsford Jones It would have been better to have called the function now known as ``is.integer()'' something like ``is.storedAsInteger

Re: [R] How to do Clustered Standard Errors for Regression in R?

2008-09-17 Thread Kingsford Jones
Bo, Try using RSiteSearch with the strings 'huber-white', 'sandwich' or even 'clustered standard errors'. You may also want to consider a mixed models approach -- see: http://www.stat.columbia.edu/~cook/movabletype/archives/2007/11/clustered_stand.html HTH, Kingsford Jones On Tue, Sep 16

Re: [R] creating rainbow gradients

2008-09-17 Thread Kingsford Jones
On Wed, Sep 17, 2008 at 3:11 PM, Gillian Silver [EMAIL PROTECTED] wrote: What would I do if I have something like: x - rnorm(1:1000) y - rnorm(1:1000) z - x + y and I want the rainbow to increase with z? (i.e., red for lowest z...all the way up to the last color in the rainbow for the

Re: [R] creating rainbow gradients

2008-09-17 Thread Kingsford Jones
On second thought, this is more likely to be what you're looking for... library(rgl) x - rnorm(1000) y - rnorm(1000) z - x + y plot3d(x, y, z, col = rainbow(1000, end = 5/6)[rank(z)], size = 3) On Wed, Sep 17, 2008 at 4:06 PM, Kingsford Jones [EMAIL PROTECTED] wrote: On Wed, Sep 17, 2008 at 3

Re: [R] autocorrelation in gams

2008-08-15 Thread Kingsford Jones
Keeping Gavin's advice in mind, you may also want to look at ?acf (and see section 14.1 of MASS) and help(ACF, package=nlme) (see section 5.3 of MEMSS). These are useful functions for exploring the 1d empirical autocorrelation structure of model residuals. hth, Kingsford Jones On Fri, Aug 15

Re: [R] Inconsistent linear model calculations

2008-05-15 Thread Kingsford Jones
and V7 is about .991 Kingsford Jones On Thu, May 15, 2008 at 3:01 PM, e-letter [EMAIL PROTECTED] wrote: Thank you to all you eagle eyes; amendment made accordingly and solved. Not sure how the difference occurred... [[alternative HTML version deleted

Re: [R] [R-sig-ME] lme nesting/interaction advice

2008-05-13 Thread Kingsford Jones
that someone more 'mathy' than me could explain. Tools like lme, lmer, proc mixed and proc glimmix fall into this category. hoping this helps, Kingsford Jones Thanks again. cheers, Rolf

Re: [R] lme nesting/interaction advice

2008-05-10 Thread Kingsford Jones
function, which might be the right tool for your analyses ( https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models ). Kingsford Jones Cheers, Federico -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St Mary's Campus Norfolk Place, London W2 1PG

Re: [R] Which gls models to use?

2008-05-09 Thread Kingsford Jones
on this list that gls is underused ( http://tolstoy.newcastle.edu.au/R/help/06/08/32487.html ). Given the fact that it can drastically reduce the constraints of the constant variance and independence assumptions of the ubiquitous linear model, I agree. good luck, Kingsford Jones Discussion on weights

Re: [R] predict lmer

2008-05-07 Thread Kingsford Jones
possible ways to get prediction intervals: https://stat.ethz.ch/pipermail/r-sig-mixed-models/2008q2/thread.html#841 Finally, why assume a Poisson error distribution for a binary response? Kingsford Jones On Wed, May 7, 2008 at 10:13 AM, Bert Gunter [EMAIL PROTECTED] wrote: Sorry, my reply below may

Re: [R] pwr package

2008-05-05 Thread Kingsford Jones
see ?library You need to load the package before R can access its functions. Kingsford Jones On Mon, May 5, 2008 at 12:18 PM, [EMAIL PROTECTED] wrote: Hello, I'm a new user of the R environment. I need to do some power analysis. For this purpose, I installed the pwr package from the R

Re: [R] data transformation

2008-05-02 Thread Kingsford Jones
, but if you had counts rather than presence/absence it could be. best, Kingsford Jones On Fri, May 2, 2008 at 2:27 PM, Christian Hof [EMAIL PROTECTED] wrote: Dear all, how can I, with R, transform a presence-absence (0/1) matrix of species occurrences into a presence-only table (3 columns

Re: [R] Making a map in R?

2008-05-01 Thread Kingsford Jones
the Spatial Task View: http://cran.r-project.org/web/packages/rgdal/index.html Also, there is a r-sig for spatial data: https://stat.ethz.ch/mailman/listinfo/r-sig-geo Kingsford Jones On Thu, May 1, 2008 at 6:56 AM, stephen sefick [EMAIL PROTECTED] wrote: Does anyone know of a package to make a map

Re: [R] Making a map in R?

2008-05-01 Thread Kingsford Jones
I sent the wrong link for the spatial Task View. Here it is http://cran.r-project.org/web/views/Spatial.html On Thu, May 1, 2008 at 8:21 AM, Kingsford Jones [EMAIL PROTECTED] wrote: There are many ways to do this, depending on what type of spatial data you are working with and what you want

Re: [R] efficiency profiling?

2008-04-30 Thread Kingsford Jones
to hang around here a while. I don't know of a nice collection (but I'm sure there are several.) Duncan Murdoch ;-) here's one: https://stat.ethz.ch/pipermail/r-help/2005-October/080991.html Kingsford Jones __ R-help@r-project.org mailing list

Re: [R] function to generate weights for lm?

2008-04-29 Thread Kingsford Jones
that the usual specification for varPower is varPower(form = ~ your.formula), but by default the mean is used. See Ch 5 of the Pinheiro and Bates Mixed-effects Models book for details) Kingsford Jones __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] nested anova and multiple comparisons

2008-04-26 Thread Kingsford Jones
finding the help of someone who is an expert in these types of models (known as mixed, hierarchical, multilevel, random effects, variance components, nested ANOVA, etc). best, Kingsford Jones Thanks __ R-help@r-project.org mailing list

Re: [R] Documentation General Comments

2008-04-24 Thread Kingsford Jones
in the documents then the onus is on me to try to get my ideas incorporated (see http://wiki.r-project.org/rwiki/doku.php?id=misc:rpatch ). Kingsford Jones On Thu, Apr 24, 2008 at 9:37 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 4/24/2008 12:08 PM, Martin Maechler wrote: Hmm, KeBe == Beck

<    1   2