Re: [R] open source and R

2005-11-14 Thread Ted Harding
On 14-Nov-05 Prof Brian Ripley wrote: On Sun, 13 Nov 2005 [EMAIL PROTECTED] wrote: [...] There is one aspect though where R users are in the cold when it comes to C and FORTAN. If you want to understand the function 'eigen', say, then you can ?eigen to learn about its usage. You can

Re: [R] correlating irregular time series

2005-11-14 Thread Christophe Pouzat
Hi Paul, Here is how an amateur statistician deals with this problem when analyzing spike trains from simultaneously recorded neurons. Start by estimating the hazard function h(t) of your several point processes (if you have a copy of MASS, check out the chapter 13, If you have a copy of Jim

Re: [R] matrix subset

2005-11-14 Thread vincent
Marc Schwartz a écrit : In R version 2.1.0, a matrix method was added to the subset() function, so I am guessing that you are several versions out of date. Please upgrade to the latest version, which is 2.2.0, where you will get: I upgraded and it works fine. Thanks for the hint. Many thanks

Re: [R] correlating irregular time series

2005-11-14 Thread paul sorenson
I don't have the texts you mention but I get the general idea. The diagram I posted shows only a small fraction of the events I have. Thank you Christophe Pouzat wrote: Hi Paul, Here is how an amateur statistician deals with this problem when analyzing spike trains from simultaneously

[R] www.krankenversicherung.ch News - Krankenkassen - Information Newsletter

2005-11-14 Thread krankenversicherung
Guten Tag Weitere Krankenkassen-Spar-Tipps fuer Sie! INHALT DIESES NEWSLETTERS 1) Trend 2006 - Der Trend geht Richtung Hausarzt-Model 2) Angebot Assura - Kennen Sie die guenstigen Praemien der Assura 3) Vergleich der Praemien 4) Voting - Jetzt koennen Sie Ihre Versicherung bewerten 5)

Re: [R] correlating irregular time series

2005-11-14 Thread Christophe Pouzat
Paul, You can get a version of Lindsey's course at the following address: http://popgen.unimaas.nl/~jlindsey/manuscripts.html At the bottom of the page under heading Courses. Christophe. paul sorenson wrote: I don't have the texts you mention but I get the general idea. The diagram I

[R] (no subject)

2005-11-14 Thread Soetaert, Karline
Hi, I am trying to solve a model that consists of rather stiff ODEs in R. I use the package ODEsolve (lsoda) to solve these ODEs. To speed up the integration, the jacobian is also specified. Basically, the model is a one-dimensional advection-diffusion problem, and thus the

Re: [R] poker package -- comments?

2005-11-14 Thread Dan Bolser
Duncan Murdoch wrote: Over the weekend I wrote a small package to evaluate poker hands and to do some small simulations with them. If anyone is interested in looking at it, I'd appreciate comments and/or contributions. How do I install this package? A README or a hint on th webpage below

[R] name of object

2005-11-14 Thread Claus Atzenbeck
Hi, I have the following function: test - function(x) { print(shapiro.test(x)) ... } The output for test(sample1$sec) is: Shapiro-Wilk normality test data: x W = 0.9447, p-value = 0.5767 ... I would like to see data: sample1$sec instead of data:

Re: [R] name of object

2005-11-14 Thread Prof Brian Ripley
On Mon, 14 Nov 2005, Claus Atzenbeck wrote: Hi, I have the following function: test - function(x) { print(shapiro.test(x)) ... } The output for test(sample1$sec) is: Shapiro-Wilk normality test data: x W = 0.9447, p-value = 0.5767 ... I would

Re: [R] how to plot matrix in graphs

2005-11-14 Thread Liaw, Andy
See ?image. Andy From: peter eric halo, how to plot a matrix (i have a multiple matrix ) in graphs in terms of colored boxes or circles. my matrix looks like A B C 6 2 3 4 3 2 2 1 7 A4 3 1 4 6 8 2 1 6 2 7 8

Re: [R] poker package -- comments?

2005-11-14 Thread Duncan Murdoch
On 11/14/2005 7:39 AM, Dan Bolser wrote: Duncan Murdoch wrote: Over the weekend I wrote a small package to evaluate poker hands and to do some small simulations with them. If anyone is interested in looking at it, I'd appreciate comments and/or contributions. How do I install this

Re: [R] odesolve with banded Jacobian [was no subject]

2005-11-14 Thread Martin Maechler
KSoet == Soetaert, Karline [EMAIL PROTECTED] on Mon, 14 Nov 2005 13:20:24 +0100 writes: KSoet Hi, I am trying to solve a model that consists of KSoet rather stiff ODEs in R. KSoet I use the package ODEsolve (lsoda) to solve these KSoet ODEs. KSoet To speed up the

[R] bug/feature with barplot?

2005-11-14 Thread Karin Lagesen
I have found a bug/feature with barplot that at least to me shows undesireable behaviour. When using barplot and plotting fewer groups/levels/factors(I am unsure what they are called) than the number of colors stated in a col statement, the colors wrap around such that the colors are not fixed to

[R] Curve fitting tutorial / clue stick?

2005-11-14 Thread Allen S. Rout
Working through the R archives and webspace, I've mostly proved to myself that I don't know enough about what statisticians call Curve Fitting to even begin translating the basics. I'm a sysadmin, and have collected a variety of measurements of my systems, and I can draw pretty pictures in R

[R] [- and indexing for zoo objects

2005-11-14 Thread Brandt, T. (Tobias)
Hi I've been greatly enjoying the functionality the zoo package offers. However I've hit a snag with the following code a - zoo(matrix(1:10,5,2), 2001:2005) a 2001 1 6 2002 2 7 2003 3 8 2004 4 9 2005 5 10 a[I(2003), 2] 2003 8 a[I(2003), 2] - NA Error: subscript

[R] Coercion of percentages by as.numeric

2005-11-14 Thread Brandt, T. (Tobias)
Hi Given that things like the following work a - c(-.1, 2.7 ,B) a [1] -.12.7 B as.numeric(a) [1] -0.1 2.7 NA Warning message: NAs introduced by coercion I naively expected that the following would behave differently. b - c('10%', '-20%', '30.0%', '.40%') b [1] 10%

Re: [R] bug/feature with barplot?

2005-11-14 Thread Marc Schwartz (via MN)
On Mon, 2005-11-14 at 15:55 +0100, Karin Lagesen wrote: I have found a bug/feature with barplot that at least to me shows undesireable behaviour. When using barplot and plotting fewer groups/levels/factors(I am unsure what they are called) than the number of colors stated in a col statement,

Re: [R] [- and indexing for zoo objects

2005-11-14 Thread Achim Zeileis
Tobias, thanks for the report: a[I(2003), 2] - NA Error: subscript out of bounds Yes, we would have to write a [-.zoo method for that, currently we rely on the corresponding methods for matrices and vectors. I'll add it to the WISHLIST and try to add this functionality for the next zoo

Re: [R] [- and indexing for zoo objects

2005-11-14 Thread Gabor Grothendieck
On 11/14/05, Brandt, T. (Tobias) [EMAIL PROTECTED] wrote: Hi I've been greatly enjoying the functionality the zoo package offers. However I've hit a snag with the following code a - zoo(matrix(1:10,5,2), 2001:2005) a 2001 1 6 2002 2 7 2003 3 8 2004 4 9 2005 5 10

[R] effect sizes for Wilcoxon tests

2005-11-14 Thread Claus Atzenbeck
Hello, I use t.test for normal distributed and wilcox.test for non-normal distributed samples. It is easy to write a function for t.test that calculates the effect size, because all parts of the formula are available from the t.test result: r = sqrt(t*t / (t*t + df)) However, for Wilcoxon

Re: [R] Coercion of percentages by as.numeric

2005-11-14 Thread Gabor Grothendieck
On 11/14/05, Brandt, T. (Tobias) [EMAIL PROTECTED] wrote: Hi Given that things like the following work a - c(-.1, 2.7 ,B) a [1] -.12.7 B as.numeric(a) [1] -0.1 2.7 NA Warning message: NAs introduced by coercion I naively expected that the following would behave

Re: [R] Curve fitting tutorial / clue stick?

2005-11-14 Thread Jean-Luc Fontaine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Allen S. Rout wrote: Working through the R archives and webspace, I've mostly proved to myself that I don't know enough about what statisticians call Curve Fitting to even begin translating the basics. I'm a sysadmin, I have just the thing

[R] Little's Chi Square test for MCAR?

2005-11-14 Thread Rohit Vishal Kumar
Hi. Can anyone point me to any module in R which implements Little's Chi Square test for MCAR. The problem is that i have around 60 behavioural variables on a 6 point categorical scale which i need to test for MCAR and MAR. What i can make out from preliminary analysis is that moderate (0.30

Re: [R] Little's Chi Square test for MCAR?

2005-11-14 Thread Dimitris Rizopoulos
This depends on the analysis you want to do; Maximum Likelihood will give you unbiased results even under MAR. In this case the more relevant question is whether the missing data mechanism is MNAR, in which case ML might give you biased results. Unfortunately you cannot test MNAR without

Re: [R] Coercion of percentages by as.numeric

2005-11-14 Thread Brandt, T. (Tobias)
-Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: 14 November 2005 06:21 PM On 11/14/05, Brandt, T. (Tobias) [EMAIL PROTECTED] wrote: Hi Given that things like the following work a - c(-.1, 2.7 ,B) a [1] -.12.7 B as.numeric(a) [1] -0.1 2.7

Re: [R] Coercion of percentages by as.numeric

2005-11-14 Thread Gabor Grothendieck
On 11/14/05, Brandt, T. (Tobias) [EMAIL PROTECTED] wrote: -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: 14 November 2005 06:21 PM On 11/14/05, Brandt, T. (Tobias) [EMAIL PROTECTED] wrote: Hi Given that things like the following work a -

Re: [R] Coercion of percentages by as.numeric

2005-11-14 Thread Marc Schwartz (via MN)
On Mon, 2005-11-14 at 19:07 +0200, Brandt, T. (Tobias) wrote: -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: 14 November 2005 06:21 PM On 11/14/05, Brandt, T. (Tobias) [EMAIL PROTECTED] wrote: Hi Given that things like the following work a

Re: [R] point pattern interactions (Gcross and Kcross)

2005-11-14 Thread Barry Rowlingson
Charlotte Reemts wrote: marked planar point pattern: 628 points multitype, with levels = w2004 w2005 window: rectangle = [ 607200 , 634800 ] x [ 3438400 , 3460400 ] I just created something as close as possible to that using random poisson points: oakfake marked planar point

Re: [R] Robust Non-linear Regression

2005-11-14 Thread Martin Maechler
Package 'sfsmisc' has had a function 'rnls()' for a while which does robust non-linear regression via M-estimation. [The name of the function is probably *really* a misnomer, since the 'ls' part stands for least squares!] Two weeks ago, there's been a small workshop Robustness and R in

Re: [R] Robust Non-linear Regression

2005-11-14 Thread Ruben Roa
-Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of Vermeiren, Hans [VRCBE] Sent: Sunday, November 13, 2005 7:48 PM To: 'r-help@stat.math.ethz.ch' Subject: [R] Robust Non-linear Regression Hi, I'm trying to use Robust non-linear regression

[R] library MASS fitdistri() funciotn question

2005-11-14 Thread David Zhao
Hi there, I've been trying to use fitdistr fuction to fit our data onto a gamma distribution, sometimes it works and sometimes it doesn't. I realized that our data 10% of time is normal distributed instead of gamma. Since this is included in a processing pipeline, I'd like to test the fitting to

[R] as.integer with base other than ten.

2005-11-14 Thread William Astle
Is there an R function analogous to the C function strtol? I would like to convert a binary string into an integer. Cheers for advice Will -- __ William Astle Statistical Genetics, David Balding's Group. Imperial College, St Mary's Hospital

Re: [R] point pattern interactions (Gcross and Kcross)

2005-11-14 Thread Charlotte Reemts
In going over the creation of the point pattern (again), I discovered a typo that switched x and y data. Once I fixed that, the code worked just fine. Thanks for your help! Charlotte Reemts wrote: marked planar point pattern: 628 points multitype, with levels = w2004 w2005 window:

Re: [R] as.integer with base other than ten.

2005-11-14 Thread Marc Schwartz (via MN)
On Mon, 2005-11-14 at 19:01 +, William Astle wrote: Is there an R function analogous to the C function strtol? I would like to convert a binary string into an integer. Cheers for advice Will There was some discussion in the past and you might want to search the archive for a more

Re: [R] open source and R

2005-11-14 Thread Liaw, Andy
Here comes a not-so-nice one: Sorry to be blunt, but I think the current reality is that one's effectiveness in scientific computing is not likely to be high if s/he can't read C for Fortran code. The mode of development for new methods, I believe, should be: - Write it in R (or S-PLUS or

[R] change some levels of a factor column in data frame according to a condition

2005-11-14 Thread Gesmann, Markus
Dear R-users, I am looking for an elegant way to change some levels of a factor column in data frame according to a condition. Lets look at the following data frame: data.frame(crit1=gl(2,5), crit2=factor(letters[1:10]), x=rnorm(10)) crit1 crit2 x 1 1 a -1.06957692 2

Re: [R] roots of a function

2005-11-14 Thread Martin Maechler
Alejandro == Alejandro Veen [EMAIL PROTECTED] on Mon, 14 Nov 2005 10:23:02 -0800 writes: Alejandro For finding the root of the following function I Alejandro have been using 'uniroot': f(p) = log(p-1) - Alejandro log(p) + 1/(p-1) - log(A) - B = 0 Alejandro where 'p' is a

[R] Tidiest way of modifying S4 classes?

2005-11-14 Thread Patrick Connolly
I wish to make modifications to the plot.pedigree function in the kinship package. My attempts to contact the maintainer have been unsuccessful, but my question is general, so specifics of the kinship package might not be an issue. My first attempt was to make a new function Plot.pedigree in the

Re: [R] change some levels of a factor column in data frame according to a condition

2005-11-14 Thread jim holtman
try this: # create data x.by http://x.by - data.frame(crit1=rep(c(1,2),c(10,10)), crit2=sample(letters[1:4],20,T), val=runif(20)) levels(x.by$crit2) - c(levels(x.by$crit2), 'small') # add 'small' to the levels y - by(x.by http://x.by, x.by$crit1, function(.grp){ .small - order(.grp$val) # find

[R] November Course In San Francisco***R/Splus Fundamentals and Programming Techniques

2005-11-14 Thread elvis
XLSolutions Corporation (www.xlsolutions-corp.com) is proud to announce 2-day R/S-plus Fundamentals and Programming Techniques in San Francisco: www.xlsolutions-corp.com/Rfund.htm San Francisco, November 17 - 18, 2005 Reserve your seat now at the early bird rates! Payment due AFTER the

Re: [R] change some levels of a factor column in data frame according to a condi

2005-11-14 Thread Francisco J. Zagmutt
Hi Gesman There may be more elegant ways to do this but here is one option: d=data.frame(crit1=gl(2,5), crit2=factor(letters[1:10]), x=rnorm(10)) #Creates data levels(d$crit2)=c(levels(d$crit2),Small)#Adds the level Small to the factor crit2. d2=d[order(d$crit1,d$x),]#Sorts x ascending, by

Re: [R] open source and R

2005-11-14 Thread Liaw, Andy
However code readability can not be over-emphasized. I must admit to have written R code in such a supposedly `clever' way that I can't figure out what I was trying to do (or how I did it) a week later... Andy From: Ernesto Jardim Hi, One single comment about the subject of this

[R] Using pakage foreign and to import SAS file

2005-11-14 Thread Walter R. Paczkowski
Hi, I'm struggling with foreign to import a SAS file. The file, for lack of imagination, is d.sas7bdat and is in my root directory (c:\) under Windows XP. When I type read.ssd(c:\\, d) which I think I'm suppose to enter, I get SAS failed. SAS program at

[R] Trouble with aovlist and Tukey test

2005-11-14 Thread Jonathan Dushoff
I am having what I think is a strange problem with applying TukeyHSD to an aov fit with error strata. TukeyHSD is supposed to take A fitted model object, usually an 'aov' fit. aov (with error strata) is supposed to generate an object of type aovlist, which is a list of objects of type aov. But

Re: [R] open source and R

2005-11-14 Thread Berton Gunter
Andy: Ah, don't feel bad, Andy; this is a universal problem in programming that despite all kinds of efforts in lucid programming, OOP, etc. no one has figured out. So while code readability cannot be overemphasized, what this actually means also apparently cannot be defined. From:

[R] (no subject)

2005-11-14 Thread [EMAIL PROTECTED]
Dear all, just a little problem report for R 2.2.0 on OpenSuse 10.0-64. Gcc version is 4.0.2 Installing fortran packages runs into: 'cc1' command not found. I apparently got away with: sudo ln -s /usr/bin/cc /usr/bin/cc1 which causes other warnings but the packages seem to function well.

Re: [R] error in NORM lib

2005-11-14 Thread Ted Harding
Folks, Leo Gürther and I have been privately discussing the problems with imputation using NORM which he originally described on 9 November. Essentially, he observed that many of the imputed missing values were totally absurd, being well out of any range comatible with the observed values of the

[R] Linear model mixed with an ARIMA model

2005-11-14 Thread Z ZX
Dear all, I'm looking for how can I input a linear model with an arma model,like log(y) = 8.95756 + 0.0346414^t - 0.1*t^2 + ut ut=-0.296ut-1+at-0.68at-1 where log(y) is qudratic function ,for the time series trend, and get then get the residuals from the first function.

[R] Linear model mixed with an ARIMA model

2005-11-14 Thread Zhu, Zhaoxuan
Dear all, I'm looking for how can I input a linear model with an arma model,like log(y) = 8.95756 + 0.0346414^t - 0.1*t^2 + ut ut=-0.296ut-1+at-0.68at-1 where log(y) is qudratic function ,for the time series trend, and get then get the residuals from the first function.

Re: [R] (no subject)

2005-11-14 Thread Prof Brian Ripley
In what sense is this a problem report for R? R does not know about cc1, unless some user told it to use it. cc1 is an internal part of gcc (the C front-end), usually found in /usr/libexec/gcc/i686-pc-linux-gnu/4.0.2 or some such path. As my path shows, it is part of gcc 4.0.2, so this looks

Re: [R] Using pakage foreign and to import SAS file

2005-11-14 Thread Rick Bilonick
On Mon, 2005-11-14 at 22:55 +, Walter R. Paczkowski wrote: Hi, I'm struggling with foreign to import a SAS file. The file, for lack of imagination, is d.sas7bdat and is in my root directory (c:\) under Windows XP. When I type read.ssd(c:\\, d) which I think I'm suppose to

Re: [R] Using pakage foreign and to import SAS file

2005-11-14 Thread Austin, Matt
If sas isn't in the path, then you might have trouble with sas.get or read.ssd. Assuming you are using windows, go to the Start menu, select run and type sas. If sas fires up it's in your path, if not then that is the reason. --Matt -Original Message- From: [EMAIL PROTECTED]

Re: [R] Using pakage foreign and to import SAS file

2005-11-14 Thread Prof Brian Ripley
It is highly unlikely that SAS is on the path, as it does not put itself there. read.ssd () has a 'sascmd' argument to give the path to SAS. This is explained *with a functioning Windows example*, on the help page for read.ssd. On Mon, 14 Nov 2005, Austin, Matt wrote: If sas isn't in the