Re: [R] test for exponential,lognormal and gammadistribution

2005-09-12 Thread Christoph Buser
Hi Nadja It depends on your purpose. Often people are using tests to show that a sample follows a distribution (normal, exponential, lognormal, ...). If a test rejects the null hypothesis that the sample comes from the specified distribution, you are on the safe side, since you are controlling

Re: [R] Backtransforming regression coefficient for scaled covariate

2005-09-12 Thread Andres Legarra
[R] Backtransforming regression coefficient for scaled covariate Your covariate in the second part of the polynomial is x^2 and not x. Therefore the transformation should be applied to x^2. Like this: (lm2 - lm(y ~ scale(x) + I(scale(x^2)) ) then you would use coef(lm2)[3]/sd(x^2) Andres --

[R] poisson mean hypothesis

2005-09-12 Thread Jan Wijffels
Dear R-users, Is there a way to get p-values for a one-sided hypothesis test about a poisson mean? Thanks, Jan Wijffels University Center for Statistics W. de Croylaan 54 3001 Heverlee Belgium tel: +32 (0)16 322784 fax: +32 (0)16 322831 http://www.kuleuven.be/ucs http://www.kuleuven.be/ucs

Re: [R] Backtransforming regression coefficient for scaled covariate

2005-09-12 Thread Gorjanc Gregor
Andres, this seems not to be the case. Look bellow the coefficients. They are not the same as in unscaled regression. R (lm1 - lm(y ~ x + I(x^2))) Call: lm(formula = y ~ x + I(x^2)) Coefficients: (Intercept)x I(x^2) 4.62069 1.78811 -0.00751 R ## Fit

Re: [R] Backtransforming regression coefficient for scaled covariate

2005-09-12 Thread Christoph Buser
Dear Gregor The solution of Andres was correct, but by reproducing his example you did a copy paste error. In the model lm2 you should scale your variable after the polynomial transformation I(scale(x^2)) and not I(scale(x)^2) Then the backtransformation in your example should work. Regards,

Re: [R] Backtransforming regression coefficient for scaled covariate

2005-09-12 Thread Andres Legarra
RE: [R] Backtransforming regression coefficient for scaled covariateYep it is the the same. Scaling does both dividing and centering (this is the reason intercept changes) and scaling is not with sd but with sum of squares divided by n-1; so, it is not s.d. because average is not substracted But

Re: [R] poisson mean hypothesis

2005-09-12 Thread Dimitris Rizopoulos
you could use something like the following (in case of two-group comparisons make the proper adjustements): pois.test - function(x, alternative = c(two.sided, less, greater), mu){ alternative - match.arg(alternative) if (missing(mu) || (length(mu) != 1 || is.na(mu))) stop('mu'

Re: [R] poisson mean hypothesis

2005-09-12 Thread Jan Wijffels
Dimitris, Thanks for the test. But you are using a normal approximation to the poisson distribution. This is not applicable in my case. I was more looking for an exact test. Probably based on Garwood's (1936) confidence interval. If there is already an R implementation available, than this would

[R] fit data with gammadistribution

2005-09-12 Thread Nadja Riedwyl
hello my data is data2:2743 4678 21427 6194 10286 1505 12811 2161 6853 2625 14542 694 11491 14924 28640 17097 2136 5308 3477 91301 11488 3860 64114 14334 by calculating shape-(mean(data2))^2/var(data2) scale-var(data2)/mean(data2) i get the idea what the parameters of the

Re: [R] [R-sig-finance] Missing

2005-09-12 Thread Marco Salvini
Hi I think that it can work with missing dataset. Where do you try to use randomForest? regards Marco Jan-Paul Roodbol [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 09/10/2005 08:10 PM To [EMAIL PROTECTED] cc r-help@stat.math.ethz.ch Subject [R-sig-finance] Missing Does anyone know

[R] remedial stats education

2005-09-12 Thread Joshua N Pritikin
In short: I didn't take enough stats courses in college. Now I am working on scientific research and I feel somewhat lost when it comes to designing the statistical framework. I have looked through the books at: http://www.r-project.org/doc/bib/R-books.html I even tried to read [17] Julian

Re: [R] remedial stats education

2005-09-12 Thread Doran, Harold
There is a Springer publication All of Statistics: a concise course in statistical inference by Larry Wasserman that might be what you are looking for. The book also has an emphasis on R and his web site has code and data sets for analysis of the examples used throughout. -Harold -Original

Re: [R] remedial stats education

2005-09-12 Thread Charles Annis, P.E.
Given that your goal is understanding the fundamentals (a wise choice as it is problematic attempting to build on an inadequate foundation, and dangerous to use tools that you don't understand), I enthusiastically recommend Peter Dalgaard's book, _Introductory Statistics with R_. Springer, 2002.

Re: [R] remedial stats education

2005-09-12 Thread Thomas Petzoldt
Doran, Harold wrote: There is a Springer publication All of Statistics: a concise course in statistical inference by Larry Wasserman that might be what you are looking for. The book also has an emphasis on R and his web site has code and data sets for analysis of the examples used throughout.

[R] oma and sub-title

2005-09-12 Thread Thomas Steiner
I want to add an outer subtitle to my 2x3-plot, but it's distance to the lowest plots is very high: 6 lines or more?! If I choose oma=c(5,0,2,0), it lies out of the plotting region and disapprears. Obviously I make something wrong here. Help appreciated, Thomas x=seq(from=1, to=3.5, length=100)

[R] barplot with multiple columns

2005-09-12 Thread Anette Nørgaard
I have a large dataset looking like this (as an example): doy-c(178,179,180,181,182,183,184,185,186,187,188) s1-c(0 , 0, 2.4 , 0 , 3.34 , 0 , 5.34 , 0 , 0 , 0 , 6.9) s2-c(0 , 9.72, 0, 10.56 , 2.67 , 0 , 6.45 ,0 , 0 , 9, 3.6) dat-cbind(doy,s1,s2) dat I need to make a barplot where the two

Re: [R] oma and sub-title

2005-09-12 Thread Thomas Petzoldt
Thomas Steiner schrieb: I want to add an outer subtitle to my 2x3-plot, but it's distance to the lowest plots is very high: 6 lines or more?! If I choose oma=c(5,0,2,0), it lies out of the plotting region and disapprears. Obviously I make something wrong here. Help appreciated, Thomas

[R] Applied Quantitative Analytics in Finance

2005-09-12 Thread Kathy Kiely
2005 APPLIED QUANTITATIVE ANALYTICS IN FINANCE EVENT o OCTOBER 6, 2005 o LONDON Please join us at the Museum of London for a series of guru-led presentations, networking, and demonstrations by academic and business thought leaders in finance from Basel II Committee, Swiss Union of Raiffeisen

Re: [R] remedial stats education

2005-09-12 Thread vincent
The Wonnacott Wonnacott http://www.amazon.com/exec/obidos/tg/detail/-/0471615188/qid=1126532904/sr=8-1/ref=pd_bbs_1/104-8196380-9551909?v=glances=booksn=507846 may be of interest hih Vincent __ R-help@stat.math.ethz.ch mailing list

[R] grepping and splitting (with R 2.1.1)

2005-09-12 Thread Stefan Th. Gries
Hi R experts I have the following regular expression problem. I am writing a basic corpus retrieval program, i.e. a concordancer/function where a user enters - a set or a directory of text files to search; - a regular expression to search for in these files. I want to provide an output in which

Re: [R] poisson mean hypothesis

2005-09-12 Thread Thomas Lumley
Use ppois(x,lambda), which gives P(X=x) for mean=lambda. Eg: lower one-sided test for observing no events with mean of 3.4 ppois(0,3.4) [1] 0.03337327 upper one-sided test for observing 8 events with a mean of 3.4 (need the -1 to include 8 in the rejection region)

Re: [R] remedial stats education

2005-09-12 Thread Chris Buddenhagen
I was in a similar situation-I recommend (Crawley 2005) which I found to be quite inspiring with many excellent examples. http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470022981.html Crawley, M. J. 2005. Statistics: An introduction using R. John Wiley Sons Ltd., Chichester, England.

[R] help for linear-circular correlation

2005-09-12 Thread ecoinfo
Hi R-profs, Maybe my question is a little off topic. Could any one tell me how to calculate a linear-circular correlation coefficient and its p-values? I had a quick look at circular and CircStats packages and did not find the related function. Thanks for any kindly help. Xiaohua -- Xiaohua

Re: [R] poisson mean hypothesis

2005-09-12 Thread Peter Dalgaard
Thomas Lumley [EMAIL PROTECTED] writes: Use ppois(x,lambda), which gives P(X=x) for mean=lambda. Eg: lower one-sided test for observing no events with mean of 3.4 ppois(0,3.4) [1] 0.03337327 upper one-sided test for observing 8 events with a mean of 3.4 (need the -1 to include 8 in

[R] heatmap question

2005-09-12 Thread Peter Scacheri
I'm having trouble with the heatmap function in R. When I try and heatmap something, my graphics window does not open. Does anyone know if this is a glitch in the version of R that I'm using? I've listed my version of R below, as well as a simple heatmap command. I'm running the program on

Re: [R] Help with a more flexible funtion for multiple comparisio n of means

2005-09-12 Thread Rogers, James A [PGRD Groton]
Jose - Before implementing SNK and Duncan's, you may want to be aware of some criticisms of these methods: From Hsu (1996), Newman-Keuls multiple range test is not a confident inequalities method and cannot be recommended. Duncan's multiple range test is not a confident inequalities method

Re: [R] heatmap question

2005-09-12 Thread Adaikalavan Ramasamy
Does any other plotting function work as they should e.g. plot(1:10) or are you connecting remotely to a server ? Regards, Adai On Mon, 2005-09-12 at 10:51 -0400, Peter Scacheri wrote: I'm having trouble with the heatmap function in R. When I try and heatmap something, my graphics window

Re: [R] heatmap question

2005-09-12 Thread vincent
Peter Scacheri a écrit : I'm having trouble with the heatmap function in R. When I try and heatmap something, my graphics window does not open. Does anyone know if this is a glitch in the version of R that I'm using? I've listed my version of R below, as well as a simple heatmap

Re: [R] heatmap question

2005-09-12 Thread Peter Scacheri
Hmmm...Seems to work OK now. Thanks for your help. Peter At 11:30 AM -0400 9/12/05, [EMAIL PROTECTED] wrote: Peter Scacheri a écrit : I'm having trouble with the heatmap function in R. When I try and heatmap something, my graphics window does not open. Does anyone know if this is a

[R] set differences

2005-09-12 Thread sms13+
Can anyone tell me how to do set differences in R? e.g., if I have a vector a-c(1,2,3,4,5) and another vector b-c(2,5), how can I do something like a/b = (1,3,4)? Thanks! --- - Steven Shechter PhD Candidate in Industrial Engineering

Re: [R] set differences

2005-09-12 Thread Sundar Dorai-Raj
[EMAIL PROTECTED] wrote: Can anyone tell me how to do set differences in R? e.g., if I have a vector a-c(1,2,3,4,5) and another vector b-c(2,5), how can I do something like a/b = (1,3,4)? Thanks! a[!a %in% b] *or* setdiff(a, b) --sundar

[R] Glmm for multiple outcomes

2005-09-12 Thread Abderrahim Oulhaj
Dear All, I wonder if there is an efficient way to fit the generalized linear mixed model for multivariate outcomes. More specifically, Suppose that for a given subject i and at a given time j we observe a multivariate outcome Yij = (Y_ij1, Y_ij2, ..., Y_ijK). where Y_ijk is a

Re: [R] fit data with gammadistribution

2005-09-12 Thread Francisco J. Zagmutt
Somebody already did the job for you. Try fitdistr{MASS} i.e. x=scan(clipboard)#Read your data from clipboard sh=(mean(x))^2/var(x) sc=var(x)/mean(x) fitdistr(x,gamma, list(shape=sh, scale=sc)) Now you probably know that you have to be carfeul when estimating distribution parameters from such

Re: [R] Backtransforming regression coefficient for scaled covariate

2005-09-12 Thread Gorjanc Gregor
Andres, thanks for detailed explanation. Things make sense now. Regards, Gregor __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] trouble with reading data from excel

2005-09-12 Thread sloan jones
I have been trying to open data that I have saved in an excel spread sheet. I saved it as a csv. Then I tried using the read.csv command. However, everytime I do this-- diseasedat-read.csv(M:/sloan/R/disease/disease.csv, sep=, header = TRUE, fill= TRUE)-- I get an error message: Error

Re: [R] trouble with reading data from excel

2005-09-12 Thread Roger Bivand
On Mon, 12 Sep 2005, sloan jones wrote: I have been trying to open data that I have saved in an excel spread sheet. I saved it as a csv. Then I tried using the read.csv command. However, everytime I do this-- diseasedat-read.csv(M:/sloan/R/disease/disease.csv, sep=, header = TRUE,

Re: [R] trouble with reading data from excel

2005-09-12 Thread Peter Dalgaard
sloan jones [EMAIL PROTECTED] writes: I have been trying to open data that I have saved in an excel spread sheet. I saved it as a csv. Then I tried using the read.csv command. However, everytime I do this-- diseasedat-read.csv(M:/sloan/R/disease/disease.csv, sep=, header = TRUE,

Re: [R] trouble with reading data from excel

2005-09-12 Thread Wensui Liu
Sloan, You don't need to save xls as csv. Actually, R reads data in excel very well. Following code is cutted from my blog and HTH. library(RODBC); ### # 1. READ DATA FROM EXCEL INTO R #

[R] Covert list of list to dataframe for export or outputting by(test) output

2005-09-12 Thread Mike Bock
Greetings, I am running a buch of wilcox tests and need to be able to rapidly export the results into a csv file. I have attached example code as well as my attempts to get what I need. I have tried unlist,cbind,rbind etc but I am obvously missing something simple. FYI I am actually running about

[R] Document clustering for R

2005-09-12 Thread Raymond K Pon
I'm working on a project related to document clustering. I know that R has clustering algorithms such as clara, but only supports two distance metrics: euclidian and manhattan, which are not very useful for clustering documents. I was wondering how easy it would be to extend the clustering

Re: [R] Covert list of list to dataframe for export or outputting by(test) output

2005-09-12 Thread Peter Dalgaard
Mike Bock [EMAIL PROTECTED] writes: Greetings, I am running a buch of wilcox tests and need to be able to rapidly export the results into a csv file. I have attached example code as well as my attempts to get what I need. I have tried unlist,cbind,rbind etc but I am obvously missing

[R] binary for Hmisc library OS-X

2005-09-12 Thread rggefrm
I'm looking for the binary of the Hmisc package (required for the Design librar) for OS-X (R 2.1) I think it is not available for download because it didn't pass all the checks. I know, it should be easy to compile from the source, but I have no access to a Mac which has installed the X-tools.

[R] Bonferroni test?

2005-09-12 Thread Chris Buddenhagen
Chris Buddenhagen, Botany Department, Charles Darwin Research Station, Santa Cruz,Galapagos. Mail: Charles Darwin Foundation, Casilla 17-01-3891 Avenida 6 de Diciembre N36-109 y Pasaje California Quito, ECUADOR Dear R experts Is there a simple means of doing this multiple comparison test in R?

Re: [R] Bonferroni test?

2005-09-12 Thread Thomas Lumley
On Mon, 12 Sep 2005, Chris Buddenhagen wrote: Is there a simple means of doing this multiple comparison test in R? p.adjust() -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] Trying to reach Frank Harrell

2005-09-12 Thread jhallman
Does anyone have a valid email address for Frank Harrell of Hmisc fame? I've tried getting in touch with him at both [EMAIL PROTECTED] and [EMAIL PROTECTED], but messages to either of those addresses get bounced. Frank, if you're reading this, please email me from an account that will accept a

[R] Running DOS command prompt from R 2.0.1 Windows?

2005-09-12 Thread Mr Toby Daniel Ahrens
I am trying to use R (windows version 2.0.1) to manage runs of a program that is run from a DOS command prompt. Is R able to call a DOS prompt? I am hoping that there is something analogous to the spawn command in IDL, but I can't see to find any help in the R archives... Thanks very much,

[R] Multiple comparisons like a Chi2 or Fisher's exact test

2005-09-12 Thread Chris Buddenhagen
Dear all I have an experiment where plots either have or have not regrown (in 40 plots) after receiving 12 different herbicide treatments and a control (no treatment). The data are significant with a Chi2, but to later distinguish if the differences are significant between each of the 12

Re: [R] [handling] Missing [values in randomForest]

2005-09-12 Thread Kevin Bartz
Hi Jan-Paul, You definitely want to be careful with na.omit in randomForest -- that wipes out any row with even one NA. If NAs are sprawled throughout your dataset, na.omit might end up killing a lot of rows. Here's my usual MO for missing values: 1) impute in Hmisc fills in gaps with the mean,

Re: [R] Help with a more flexible funtion for multiple comparisio n of means

2005-09-12 Thread Jose Claudio Faria
Rogers, James A [PGRD Groton] wrote: Jose - Before implementing SNK and Duncan's, you may want to be aware of some criticisms of these methods: From Hsu (1996), Newman-Keuls multiple range test is not a confident inequalities method and cannot be recommended. Duncan's multiple

Re: [R] trouble with reading data from excel

2005-09-12 Thread John Charles Considine
Sloane, try, diseasedat-read.csv(M:\\sloan\\R\\disease\\disease.csv) and read http://cran.r-project.org/doc/manuals/R-data.html JC On Mon, 2005-09-12 at 19:58 +0100, sloan jones wrote: I have been trying to open data that I have saved in an excel spread sheet. I saved it as a csv.

Re: [R] trouble with reading data from excel

2005-09-12 Thread Murray Pung
Alternatively, you can set the working directory to your folder: File Change dir... Select your directory, and then: diseasedat - read.csv(disease.csv) Murray -Original Message- From: John Charles Considine [mailto:[EMAIL PROTECTED] Sent: Tuesday, 13 September 2005 9:29 AM To:

[R] R news: Call for Papers

2005-09-12 Thread Torsten Hothorn
Dear useRs and developeRs, the next issue of `R news' is scheduled for the beginning of November and we are now accepting submissions for this last issue in 2005. For more information see http://cran.r-project.org/doc/Rnews/ If you are the author of a package on CRAN and you would like

Re: [R] Document clustering for R

2005-09-12 Thread Mulholland, Tom
I searched the help for cosine distance and this was the first hit http://finzi.psych.upenn.edu/R/Rhelp02a/archive/3946.html Tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Raymond K Pon Sent: Tuesday, 13 September 2005 3:48 AM To:

Re: [R] Fisher's exact test vs Chi-square

2005-09-12 Thread John Sorkin
Timothy, I believe you are mistaken. Fisher's exact test give the correct answer even in the face of small expected values for the cell counts. Pearson's Chi-square approximates Fisher's exact test and can give the wrong answer when expected cell counts are low. Chi-square was developed because it

Re: [R] Fisher's exact test vs Chi-square

2005-09-12 Thread Frank E Harrell Jr
John Sorkin wrote: Timothy, I believe you are mistaken. Fisher's exact test give the correct answer even in the face of small expected values for the cell counts. Pearson's Chi-square approximates Fisher's exact test and can give the wrong answer when expected cell counts are low. Chi-square

Re: [R] Discrepancy between R and SPSS in 2-way, repeated measures ANOVA

2005-09-12 Thread John Maindonald
For the record, it turns out that EXPNO ran from 1 to 20, i.e., it identified subject. Thus EXPNO/COND parsed into the two error terms (additional to residual) EXPNO and EXPNO:COND. This second error term accounts for all variation between levels of COND; so there is no COND sum of squares.

[R] Translating lme model call to lme4

2005-09-12 Thread Ross Darnell
I would appreciate help translating the following lme model to an lmer function. lme(lognrms ~ Group*Rotation*muscle*side*support*arms, random=~1|Subject/Stratum2/rep, data=Data) Many thanks Ross Darnell [EMAIL PROTECTED] __

Re: [R] Translating lme model call to lme4

2005-09-12 Thread Doran, Harold
Only the random portion will differ as in: lmer(lognrms ~ Group*Rotation*muscle*side*support*arms + (1|Subject) + (1|Stratum) + (1|rep), Data) -Original Message- From: [EMAIL PROTECTED] on behalf of Ross Darnell Sent: Mon 9/12/2005 9:28 PM To: r-help@stat.math.ethz.ch Cc:

Re: [R] Translating lme model call to lme4

2005-09-12 Thread Simon Blomberg
There is a slight caveat in that lmer does not respect implicit nesting, so you need to make sure your nested groups have unique levels: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/47413.html http://finzi.psych.upenn.edu/R/Rhelp02a/archive/47423.html Simon. At 11:42 AM 13/09/2005, Doran,

Re: [R] Finding a decision tree's leaf node from a new value

2005-09-12 Thread Stephen D. Weigand
It sounds to me like you're looking for the function predict.rpart(). Hope this helps, Stephen On Sep 9, 2005, at 8:45 AM, João Mendes Moreira wrote: Dear mailinglist members, I have the following problem: I run a decision tree using the rpart function and, afterwords, I try to find to

[R] R CMD INSTALL -l /path/to/library packagename

2005-09-12 Thread McClatchie, Sam (PIRSA-SARDI)
Background: OS: Linux Mandrake 10.1 release: R 2.1.1 editor: GNU Emacs 21.3.2 front-end: ESS 5.2.3 Colleagues Since I upgraded to R 2.1.1, I am getting a an error message from R CMD INSTALL packagename that says R_HOME ('/usr/local/lib/R') not found. That's not too surprising, since R is now