Re: [R] difference in sort order linux/Windows (R.2.11.0)

2010-05-28 Thread Duncan Murdoch
On 28/05/2010 9:24 AM, (Ted Harding) wrote: An experiment: sort(c(AACD,A CD)) # [1] AACD A CD sort(c(ABCD,A CD)) # [1] ABCD A CD sort(c(ACCD,A CD)) # [1] ACCD A CD sort(c(ADCD,A CD)) # [1] A CD ADCD sort(c(AECD,A CD)) # [1] A CD AECD ## (with results for AFCD, ...

Re: [R] difference in sort order linux/Windows (R.2.11.0)

2010-05-28 Thread Ted Harding
On 28-May-10 14:37:39, Duncan Murdoch wrote: On 28/05/2010 9:24 AM, (Ted Harding) wrote: An experiment: sort(c(AACD,A CD)) # [1] AACD A CD sort(c(ABCD,A CD)) # [1] ABCD A CD sort(c(ACCD,A CD)) # [1] ACCD A CD sort(c(ADCD,A CD)) # [1] A CD ADCD sort(c(AECD,A

Re: [R] difference in sort order linux/Windows (R.2.11.0)

2010-05-28 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ted Harding Sent: Friday, May 28, 2010 1:15 PM To: r-help@r-project.org Cc: carslaw Subject: Re: [R] difference in sort order linux/Windows (R.2.11.0) On 28-May-10 14:37:39

Re: [R] difference in sort order linux/Windows (R.2.11.0)

2010-05-28 Thread Ted Harding
Linux problem solved! (For me at any rate). Thanks to some hints from my Linux contacts it transpires that the problem with sort EOT ABCD A CD EOT # ABCD # A CD sort EOT ADCD A CD EOT # A CD # ADCD arises because, by default, the is ignored in sorting. Therefore in the first case it sorted

[R] difference along a vector

2010-05-12 Thread Clark Johnston
I was looking for a function which would take the difference along a vector? a-c(1,12,23,44,15,28,7,8,9,10) if I set the number difference to 3 would return 43 2 5 -37 -7 -19 3 or do I need to write my own function for this. -- View this message in context:

Re: [R] difference along a vector

2010-05-12 Thread Peter Ehlers
?diff and look at argument 'lag'. On 2010-05-12 13:06, Clark Johnston wrote: I was looking for a function which would take the difference along a vector? a-c(1,12,23,44,15,28,7,8,9,10) if I set the number difference to 3 would return 43 2 5 -37 -7 -19 3 or do I need to write my own

Re: [R] difference along a vector

2010-05-12 Thread Erik Iverson
help.search(difference) would lead you to ?diff, see the lag argument Clark Johnston wrote: I was looking for a function which would take the difference along a vector? a-c(1,12,23,44,15,28,7,8,9,10) if I set the number difference to 3 would return 43 2 5 -37 -7 -19 3 or do I need to

Re: [R] difference along a vector

2010-05-12 Thread Marc Schwartz
On May 12, 2010, at 2:06 PM, Clark Johnston wrote: I was looking for a function which would take the difference along a vector? a-c(1,12,23,44,15,28,7,8,9,10) if I set the number difference to 3 would return 43 2 5 -37 -7 -19 3 or do I need to write my own function for this.

Re: [R] difference along a vector

2010-05-12 Thread Henrique Dallazuanna
Try this: n - 3 apply(embed(a, n + 1)[,c(1, n + 1)], 1, diff) On Wed, May 12, 2010 at 4:06 PM, Clark Johnston clarks...@clarktx.comwrote: I was looking for a function which would take the difference along a vector? a-c(1,12,23,44,15,28,7,8,9,10) if I set the number difference to 3 would

Re: [R] difference between date and times

2010-02-23 Thread Ista Zahn
Hi Karine, time1 - as.POSIXct(2007-02-21 05:19:00) time2 - as.POSIXct(2007-02-20 14:21:53) difftime(time1, time2) should get you started. -Ista On Tue, Feb 23, 2010 at 9:48 AM, karine heerah karine.hee...@hotmail.fr wrote: Hi, I have date and time in a format like this: 2007-02-21

Re: [R] difference between date and times

2010-02-23 Thread Benilton Carvalho
dd = as.POSIXlt(c(2007-02-21 05:19:00, 2007-02-20 14:21:53), format=%Y-%m-%d %H:%M:%S) dd[1]-dd[2] b On Tue, Feb 23, 2010 at 2:48 PM, karine heerah karine.hee...@hotmail.fr wrote: Hi, I have date and time in a format like this: 2007-02-21 05:19:00. Do you which function i can use to

Re: [R] Difference in Levene's test between R and SPSS

2010-02-15 Thread Ravi Kulkarni
I think I have an answer: SPSS uses absolute deviations from the _mean_ in Levene's test. (See calculation in http://www.uvm.edu/~dhowell/gradstat/psych340/Lectures/Anova/anova2.html) R uses absolute deviations from the _median_ (R help). So the difference. Ravi -- View this message in

Re: [R] Difference in Levene's test between R and SPSS

2010-02-15 Thread Ravi Kulkarni
I forgot to reply to Peter Ehler's question: I am using Levene's test in the car package. Ravi -- View this message in context: http://n4.nabble.com/Difference-in-Levene-s-test-between-R-and-SPSS-tp1555725p1556016.html Sent from the R help mailing list archive at Nabble.com.

[R] Difference in Levene's test between R and SPSS

2010-02-14 Thread Ravi Kulkarni
Hello, I notice that when I do Levene's test to test equality of variances across levels of a factor, I get different answers in R and SPSS 16. e.g.: For the chickwts data, in R, levene.test(weight, feed) gives F=0.7493, p=0.5896. SPSS 16 gives F=0.987, p=0.432 Why this difference? Which

Re: [R] Difference in Levene's test between R and SPSS

2010-02-14 Thread Peter Ehlers
Ravi Kulkarni wrote: Hello, I notice that when I do Levene's test to test equality of variances across levels of a factor, I get different answers in R and SPSS 16. e.g.: For the chickwts data, in R, levene.test(weight, feed) gives F=0.7493, p=0.5896. SPSS 16 gives F=0.987, p=0.432 Why

[R] difference between ' and

2010-01-27 Thread Ivan Calandra
Hi everybody, From my experience (which is limited), it seems to me that ' (apostrophe) and (quotation marks) are the same in R: they are both used for strings. The only difference would be taste. But I've recently read about the difference between = and - and I thought that there might be a

Re: [R] difference between ' and

2010-01-27 Thread Karl Ove Hufthammer
On Wed, 27 Jan 2010 14:15:28 +0100 Ivan Calandra ivan.calan...@uni- hamburg.de wrote: From my experience (which is limited), it seems to me that ' (apostrophe) and (quotation marks) are the same in R: they are both used for strings. The only difference would be taste. But I've recently

[R] difference between the meaning of MARGIN in sweep() and apply()

2009-12-16 Thread Levi Waldron
For example, subtracting 1:2 from the rows of a two-column matrix: t(apply(matrix(1:6,ncol=2),MARGIN=1,function(y) y - 1:2)) [,1] [,2] [1,]02 [2,]13 [3,]24 sweep(matrix(1:6,ncol=2),MARGIN=2,1:2,FUN=-) [,1] [,2] [1,]02 [2,]13 [3,]24 Is

Re: [R] difference between the meaning of MARGIN in sweep() and apply()

2009-12-16 Thread Charles C. Berry
On Wed, 16 Dec 2009, Levi Waldron wrote: For example, subtracting 1:2 from the rows of a two-column matrix: t(apply(matrix(1:6,ncol=2),MARGIN=1,function(y) y - 1:2)) [,1] [,2] [1,]02 [2,]13 [3,]24 sweep(matrix(1:6,ncol=2),MARGIN=2,1:2,FUN=-) [,1] [,2] [1,]

[R] Difference in S.E. gee/yags and geeglm(/geese)

2009-12-08 Thread Torleif Markussen Lunde
Hi A quick question. Standard errors reported by gee/yags differs from the ones in geeglm (geepack). require(gee) require(geepack) require(yags) mm - gee(breaks ~ tension, id=wool, data=warpbreaks, corstr=exchangeable) mm2 - geeglm(breaks ~ tension, id=wool, data=warpbreaks,

Re: [R] difference of two rows

2009-11-26 Thread clion
Yes, thanks, that works perfectly! great command b. jholtman wrote: Try this: x - read.table(textConnection(ID YEAR + 13 2007 + 15 2003 + 15 2006 + 15 2008 + 21 2006 + 21 2007), header=TRUE) x$diff - ave(x$YEAR, x$ID, FUN=function(a) c(diff(a), NA)) x ID YEAR diff 1 13

[R] difference of two rows

2009-11-25 Thread clion
Dear R user, I'd like to calculate the difference of two rows, where ID is the same. eg.: I've got the following dataframe: ID YEAR 13 2007 15 2003 15 2006 15 2008 21 2006 21 2007 and I'd like to get the difference, like this: ID YEAR diff 13 2007 NA 15 2003 3 15 2006 2 15

Re: [R] difference of two rows

2009-11-25 Thread R Help
You want to use tapply ?tapply This is a simple example dat = data.frame(a=sample(1:10,100,T),b=rnorm(100,0,1)) tapply(dat$b,dat$a,mean) Hope that helps, Sam On Wed, Nov 25, 2009 at 11:55 AM, clion birt...@hotmail.com wrote: Dear R user, I'd like to calculate the difference of two rows,

Re: [R] difference of two rows

2009-11-25 Thread jim holtman
Try this: x - read.table(textConnection(ID YEAR + 13 2007 + 15 2003 + 15 2006 + 15 2008 + 21 2006 + 21 2007), header=TRUE) x$diff - ave(x$YEAR, x$ID, FUN=function(a) c(diff(a), NA)) x ID YEAR diff 1 13 2007 NA 2 15 20033 3 15 20062 4 15 2008 NA 5 21 20061 6 21 2007 NA On

Re: [R] difference between names, colnames and dimnames

2009-07-01 Thread Don MacQueen
I think your problem is with plotting, not with naming. Tell the list what kind of plot you're doing (with example code, of course) and where you need to see names on the plot. (What do you have in mind when you say names for the whole matrix? There are row names, and column names, and

[R] difference between names, colnames and dimnames

2009-06-30 Thread Germán Bonilla
Hi all... I built a matrix binding vectors with rbind, and have something like this: [,1] [,2][,3] [,4] [,5] [,6] [,7] [,8] CLS 3.877328 4.087636 4.72089 4.038361 3.402942 2.786285 2.671222 3.276419 ORD NaN NaN NaN NaN 5.770780 5.901113

Re: [R] difference between names, colnames and dimnames

2009-06-30 Thread jim holtman
You should be doing colnames(tester) - c(uno,dos,tres,cuatro,cinco,seis,siete,ocho) On Tue, Jun 30, 2009 at 7:08 PM, Germán Bonilla germa...@gmail.com wrote: Hi all... I built a matrix binding vectors with rbind, and have something like this: [,1] [,2][,3] [,4] [,5]

[R] Difference beetwen element in the same column

2009-06-17 Thread Carletto Rossi
Hi, i have this file pressure,k,eps,zeta,f,velocity:0,velocity:1,velocity:2,vtkValidPointMask,Point Coordinates:0,Point Coordinates:1,Point Coordinates:2,vtkOriginalIndices 0.150545,0.000575811,0.0231277,0.000339049,-0.0193008,0.00318629,-6.24066e-07,5.39599e-05,^A,7,0,0,0

Re: [R] Difference beetwen element in the same column

2009-06-17 Thread Carletto Rossi
my goal is to compute this variable tauw = 0.00095* velocity:0 (of the second row: 0.00367781) / (0.0003035 - 0) and tauw1 = 0.00095* velocity:0 (of the third row : 0.232017) / (0.0003035 - 0) and put tauw e tauw1 in a new variable 2009/6/17 Carletto Rossi nuovo...@gmail.com Hi, i have

Re: [R] Difference beetwen element in the same column

2009-06-17 Thread David Winsemius
tdf - read.table(textConnection(pressure , k , eps , zeta , f , velocity0 , velocity1 , velocity2 , vtkValidPointMask , PointCoordinates0 , PointCoordinates1 , PointCoordinates2\n 0.150545 , 0.000575811 , 0.0231277, 0.000339049, -0.0193008, 0.00318629, -6.24066e-07, 5.39599e-05, A, 7, 0, 0,

Re: [R] Difference beetwen element in the same column

2009-06-17 Thread David Winsemius
On Jun 17, 2009, at 5:49 PM, Carletto Rossi wrote: my goal is to compute this variable tauw = 0.00095* velocity:0 (of the second row: 0.00367781) / (0.0003035 - 0) I'm sorry, you have exceeded your daily quota of homework help. Read some introductory material and come back after you

Re: [R] Difference between gam() and loess().

2009-03-23 Thread Rolf Turner
On 21/03/2009, at 3:19 AM, Ravi Varadhan wrote: snip I also tried a number of other things including changing the family, and parameters in loess.control, but to no avail. I looked at the Fortran codes from both loess and gam. They are daunting, to say the least. They are dense,

Re: [R] Difference in client vs. server graphics defaults

2009-03-20 Thread Richard Cotton
lawnboy34 wrote: I am having trouble with the difference between default graphic settings on my client machine and the instance of R on our company's server. I created a script locally that output graphs, but when I run it on the server the output graphs have titles running past the

Re: [R] Difference between gam() and loess().

2009-03-20 Thread Ravi Varadhan
of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Kevin E. Thorpe kevin.tho...@utoronto.ca Date: Thursday, March 19, 2009 8:23 pm Subject: Re: [R] Difference between gam() and loess(). To: Rolf Turner r.tur...@auckland.ac.nz Cc: R-help

Re: [R] Difference between gam() and loess().

2009-03-20 Thread Kevin E. Thorpe
Subject: Re: [R] Difference between gam() and loess(). To: Rolf Turner r.tur...@auckland.ac.nz Cc: R-help Forum r-help@r-project.org Rolf Turner wrote: It seems that in general gam(y~lo(x)) # gam() from the gam package. and loess(y~x) give slightly different results

Re: [R] Difference between gam() and loess().

2009-03-20 Thread Kevin E. Thorpe
at the Fortran. I guess one simple parameter change may not quite do it. :-) Kevin - Original Message - From: Kevin E. Thorpe kevin.tho...@utoronto.ca Date: Thursday, March 19, 2009 8:23 pm Subject: Re: [R] Difference between gam() and loess(). To: Rolf Turner r.tur

[R] Difference between gam() and loess().

2009-03-19 Thread Rolf Turner
It seems that in general gam(y~lo(x)) # gam() from the gam package. and loess(y~x) give slightly different results (in respect of the predicted/fitted values). Most noticeable at the endpoints of the range of x. Can anyone enlighten me about the reason for this difference?

[R] Difference in client vs. server graphics defaults

2009-03-19 Thread Jason Pare
Hello, I am having trouble with the difference between default graphic settings on my client machine and the instance of R on our company's server. I created a script locally that output graphs, but when I run it on the server the output graphs have titles running past the margins, legends

Re: [R] Difference between gam() and loess().

2009-03-19 Thread Kevin E. Thorpe
Rolf Turner wrote: It seems that in general gam(y~lo(x)) # gam() from the gam package. and loess(y~x) give slightly different results (in respect of the predicted/fitted values). Most noticeable at the endpoints of the range of x. Can anyone enlighten me about the reason for this

Re: [R] difference between Primitive and Generic

2009-03-09 Thread Duncan Murdoch
Edna Bell wrote: Dear R Gurus: What is the difference between a Primitive and a Generic, please? They are talking about different things (though both look like functions): generic talks about the user interface, primitive talks about the internal implementation. A generic is a

[R] difference between Primitive and Generic

2009-03-08 Thread Edna Bell
Dear R Gurus: What is the difference between a Primitive and a Generic, please? Thanks, Edna Bell __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] difference between assignment syntax - vs =

2009-02-23 Thread Thomas Mang
Hi, thanks for the link. In the bottom part of the relevant section, you say: Standard advice is to avoid using '=' when you mean '-' Is this a formal, generally accepted (R community) advice, or does it reflect you personal opinion? Note I am not asking this question as to criticize by

Re: [R] difference between assignment syntax - vs =

2009-02-23 Thread Patrick Burns
Since this topic came up, I've been thinking that that sentence needs more work. The standard is not from me -- I'm a bit more agnostic than the statement although I personally always use '-'. I'm thinking a revised version might be something along the lines of: Standard advice from most

Re: [R] difference between assignment syntax - vs =

2009-02-23 Thread Thomas Lumley
On Mon, 23 Feb 2009, Patrick Burns wrote: Since this topic came up, I've been thinking that that sentence needs more work. The standard is not from me -- I'm a bit more agnostic than the statement although I personally always use '-'. I'm thinking a revised version might be something along

Re: [R] difference between assignment syntax - vs =

2009-02-23 Thread Wacek Kusnierczyk
Thomas Lumley wrote: Although it's probably true that most long-time R users use -, this is at least in part because a long-time R user would initially have had to use -, since = wasn't available in the distant past. I would say that it's entirely a matter of taste -- the things that

Re: [R] difference between assignment syntax - vs =

2009-02-23 Thread Ken Knoblauch
Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no writes: Thomas Lumley wrote: Although it's probably true that most long-time R users use -, this is at least in part because a long-time R user would initially have had to use -, since = wasn't available in the distant past.

Re: [R] difference between assignment syntax - vs =

2009-02-23 Thread Wacek Kusnierczyk
Ken Knoblauch wrote: Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no writes: Thomas Lumley wrote: Although it's probably true that most long-time R users use -, this is at least in part because a long-time R user would initially have had to use -, since = wasn't

Re: [R] difference between assignment syntax - vs =

2009-02-23 Thread Kenneth Knoblauch
It's easier to read. Better machine-human interaction. ergonomic: (esp. of workplace design) intended to provide optimum comfort and to avoid stress or injury. Quoting Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no: Ken Knoblauch wrote: Wacek Kusnierczyk

[R] difference between assignment syntax - vs =

2009-02-21 Thread Thomas Mang
Hi, Both operators - and = can be used to make an assignment. My question is: Is there a semantic difference between these two? Some time ago, I remember I have read that because of some reason, one should be given preference over the other - but I cannot remember the source, nor the

Re: [R] difference between assignment syntax - vs =

2009-02-21 Thread Esmail Bonakdarian
Patrick Burns wrote: 'The R Inferno' page 78 is one source you can look at. Patrick Burns wow .. nice! .. thanks for posting this reference. Esmail __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Difference between GEE and Robust Cluster Standard Errors

2009-02-19 Thread Thomas Lumley
On Wed, 18 Feb 2009, jjh21 wrote: Hello, I know that two possible approaches to dealing with clustered data would be GEE or a robust cluster covariance matrix from a standard regression. What are the differences between these two methods, or are they doing the same thing? Thanks. There are

[R] Difference between GEE and Robust Cluster Standard Errors

2009-02-18 Thread jjh21
Hello, I know that two possible approaches to dealing with clustered data would be GEE or a robust cluster covariance matrix from a standard regression. What are the differences between these two methods, or are they doing the same thing? Thanks. -- View this message in context:

[R] Difference MNP-package and rmnpGibbs from bayesm-package

2009-02-13 Thread Tryntsje Wesselius
Hi all, For my research I have to use a Multinomial Probit model. I saw that there are two packages, that include a method to estimate my parameters. The first one is the MNP-package of Imai and van Dyk. The second one is part of the bayesm-package of Rossi. The results for both packages are not

Re: [R] Difference between a[[i]] and a[i]

2009-02-03 Thread Wacek Kusnierczyk
Rolf Turner wrote: On 3/02/2009, at 12:45 PM, David Epstein wrote: I'm sure I've read about the difference between a[[i]] and a[i] in R, but I cannot recall what I read. Even more disturbing is the fact that I don't know how to search the newsgroup for this. All the different combinations

Re: [R] Difference between a[[i]] and a[i]

2009-02-03 Thread Carl Witthoft
I think the thing that escaped me for quite a while was tracking down the syntax to specify elements of a list element: x[[5]][3:7] to get items from within the 5th element of x. Seems IIRC there are some types of variables for which the form x$thing[3:7] fails and others for which it

[R] Difference between a[[i]] and a[i]

2009-02-02 Thread David Epstein
I'm sure I've read about the difference between a[[i]] and a[i] in R, but I cannot recall what I read. Even more disturbing is the fact that I don't know how to search the newsgroup for this. All the different combinations I tried were declared not to be valid search syntax. 1. What sort of

Re: [R] Difference between a[[i]] and a[i]

2009-02-02 Thread Duncan Murdoch
On 02/02/2009 6:45 PM, David Epstein wrote: I'm sure I've read about the difference between a[[i]] and a[i] in R, but I cannot recall what I read. Even more disturbing is the fact that I don't know how to search the newsgroup for this. All the different combinations I tried were declared not to

[R] difference between line() and lm()

2009-01-27 Thread Jörg Groß
Hi, what exactly is the difference between the computation of intercept and slope coefficents in a standard bivariate regression via the lm() function and the line() function? __ R-help@r-project.org mailing list

[R] difference between sm.density() and kde2d()

2008-10-04 Thread Lavan
Dear R users, I used sm.density function in the sm package and kde2d() in the MASS package to estimate the bivariate density. Then I calculated the Kullback leibler divergence meassure between a distribution and the each of the estimated densities, but the asnwers are different. Is there any

[R] difference of two data frames

2008-09-14 Thread joseph
Hello I have 2 data frames DF1 and DF2 where DF2 is a subset of DF1: DF1= data.frame(V1=1:6, V2= letters[1:6]) DF2= data.frame(V1=1:3, V2= letters[1:3]) How do I create a new data frame of the difference between DF1 and DF2 newDF=data.frame(V1=4:6, V2= letters[4:6]) In my real data, the rows are

Re: [R] difference of two data frames

2008-09-14 Thread Jorge Ivan Velez
Hi Joseph, Try this: DF1[!DF1$V1%in%DF2$V1,] subset(DF1,!V1%in%DF2$V1) HTH, Jorge On Sun, Sep 14, 2008 at 12:49 PM, joseph [EMAIL PROTECTED] wrote: Hello I have 2 data frames DF1 and DF2 where DF2 is a subset of DF1: DF1= data.frame(V1=1:6, V2= letters[1:6]) DF2= data.frame(V1=1:3, V2=

Re: [R] difference of two data frames

2008-09-14 Thread joseph
PROTECTED] To: joseph [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, September 14, 2008 10:07:48 AM Subject: RE: [R] difference of two data frames Hi: If you mean a dataframe of the rows in DF1 that are not in DF2 , then I think below will work for the letters, which , according to what I'm

Re: [R] difference of two data frames

2008-09-14 Thread joseph
] To: joseph [EMAIL PROTECTED] Cc: r-help@r-project.org Sent: Sunday, September 14, 2008 10:23:33 AM Subject: Re: [R] difference of two data frames Hi Joseph, Try this: DF1[!DF1$V1%in%DF2$V1,] subset(DF1,!V1%in%DF2$V1) HTH, Jorge On Sun, Sep 14, 2008 at 12:49 PM, joseph [EMAIL PROTECTED] wrote

Re: [R] difference of two data frames

2008-09-14 Thread Adaikalavan Ramasamy
Velez [EMAIL PROTECTED] To: joseph [EMAIL PROTECTED] Cc: r-help@r-project.org Sent: Sunday, September 14, 2008 10:23:33 AM Subject: Re: [R] difference of two data frames Hi Joseph, Try this: DF1[!DF1$V1%in%DF2$V1,] subset(DF1,!V1%in%DF2$V1) HTH, Jorge On Sun, Sep 14, 2008 at 12:49 PM, joseph

Re: [R] difference of two data frames

2008-09-14 Thread joseph
be considered when calculating the difference. - Original Message From: Jorge Ivan Velez [EMAIL PROTECTED] To: joseph [EMAIL PROTECTED] Sent: Sunday, September 14, 2008 11:14:11 AM Subject: Re: [R] difference of two data frames Hi Joseph, I'm not sure if I understood your point, but try

Re: [R] Difference in p-values between R and SPSS

2008-09-12 Thread Kåre Edvardsen
I thought the difference is to big too, so I tried both breslow and efron with same different result, and exact goes for ever, which is strange as I'm only using one dependent varable here. Could be that n~50.000, and I haven't got the most powerful computer either. I'm not aiming to get equal

[R] Difference in p-values between R and SPSS

2008-09-11 Thread Kåre Edvardsen
My apologies for asking slightly about SPSS in addition to R... Could not find an exact answer in the archives on whether R and SPSS may give different p-vals when output for coeffs and conf-intervals are the same. Amyway, a colleague and I are doing a very simple coxreg analyses and get the same

Re: [R] Difference in p-values between R and SPSS

2008-09-11 Thread Uwe Ligges
Kåre Edvardsen wrote: My apologies for asking slightly about SPSS in addition to R... Could not find an exact answer in the archives on whether R and SPSS may give different p-vals when output for coeffs and conf-intervals are the same. Amyway, a colleague and I are doing a very simple coxreg

Re: [R] Difference in p-values between R and SPSS

2008-09-11 Thread Thomas Lumley
That is a larger difference in p-values than I would expect due to numerical differences and stopping criteria. My guess is that you are running across the different approximations for tied failure times. If so, you will get better agreement with SPSS by using method=breslow in coxph().

[R] difference between MASS::polr() and Design::lrm()

2008-06-30 Thread vito muggeo
Dear all, It appears that MASS::polr() and Design::lrm() return the same point estimates but different st.errs when fitting proportional odds models, grade-c(4,4,2,4,3,2,3,1,3,3,2,2,3,3,2,4,2,4,5,2,1,4,1,2,5,3,4,2,2,1)

Re: [R] difference between MASS::polr() and Design::lrm()

2008-06-30 Thread Rune Haubo
Dear Vito No, you are not wrong, but you should center score prior to model estimation: summary(fm1 - polr(factor(grade)~I(score - mean(score which gives the same standard errors as do lrm. Now the intercepts refer the median score rather than some potential unrealistic score of 0. You can

Re: [R] difference between MASS::polr() and Design::lrm()

2008-06-30 Thread Rune Haubo
Hi Vito (question to the authors of MASS below) 2008/6/30 vito muggeo [EMAIL PROTECTED]: Dear Haubo, many thanks for your reply. Yes you are right, by scaling the score, I get the same results. However it sounds strange to me. I understand that the SE and/or t-ratio of the intercepts depend

Re: [R] difference between nlm and nlminb

2008-06-12 Thread DavidM.UK
Thank you for those details, the only optimization routine I've come accross outside of CRAN is: http://www.stat.umn.edu/geyer/trust/ Personally I only use nlminb for the estimation of Time Series models, which typically have well defined limits for the elements of the parameter vector - so in

Re: [R] difference between nlm and nlminb

2008-06-11 Thread DavidM.UK
I believe nlminb() performs *constrained* optimization, where as nlm() is for *unconstrained* opimization So I guess nlm() is for solving min(f[a,b]), and nlminb() min(f[a,b]) given a+b = c FYI I think optim() also does constrained optimization, well I've used for min(f[a,b]) given a = a* and

Re: [R] difference between nlm and nlminb

2008-06-11 Thread Douglas Bates
nlminb provides unconstrained optimization and optimization subject to box constraints (i.e. upper and/or lower constraints on individual elements of the parameter vector). The nlm function provides unconstrained optimization. I created the nlminb function because I was unable to get reliable

[R] Difference between snw and rnw files

2008-06-02 Thread Delphine Fontaine
Dear R-users, I use Sweave for quite a long time but I still wonder what is the difference between snw and rnw files. Why these two file extensions ? I searched the web without success. Thanks for your answers. Delphine Fontaine __

Re: [R] Difference between snw and rnw files

2008-06-02 Thread Duncan Murdoch
On 6/2/2008 7:25 AM, Delphine Fontaine wrote: Dear R-users, I use Sweave for quite a long time but I still wonder what is the difference between snw and rnw files. Why these two file extensions ? I searched the web without success. Thanks for your answers. There is no difference from the

Re: [R] difference between 2 ecdfs

2008-03-27 Thread Erwann.Rogard
8:51 PM To: [EMAIL PROTECTED] Subject: Re: [R] difference between 2 ecdfs In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: hi, a) i have something like: ecdfgrp1-ecdf(subset(mydata,TMT_GRP==1)$Y); ecdfgrp2-ecdf(subset(mydata,TMT_GRP==2)$Y); how can i plot the difference

Re: [R] difference between 2 ecdfs

2008-03-27 Thread Zaihra T
it to *look like* a step function. Any suggestion? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Winsemius Sent: Friday, March 21, 2008 8:51 PM To: [EMAIL PROTECTED] Subject: Re: [R] difference between 2 ecdfs

[R] difference between 2 ecdfs

2008-03-21 Thread Erwann.Rogard
hi, a) i have something like: ecdfgrp1-ecdf(subset(mydata,TMT_GRP==1)$Y); ecdfgrp2-ecdf(subset(mydata,TMT_GRP==2)$Y); how can i plot the difference between these 2 step functions? i could begin with ecdfrefl-function(x){ecdfgrp2(x)-ecdfgrp1(x);} ... what next? b) if i have a vector with

Re: [R] difference between 2 ecdfs

2008-03-21 Thread David Winsemius
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: hi, a) i have something like: ecdfgrp1-ecdf(subset(mydata,TMT_GRP==1)$Y); ecdfgrp2-ecdf(subset(mydata,TMT_GRP==2)$Y); how can i plot the difference between these 2 step functions? i could begin with

[R] difference between lrm's Model L.R. and anova's Chi-Square

2008-03-02 Thread johnson4
I am running lrm() with a single factor. I then run anova() on the fitted model to obtain a p-value associated with having that factor in the model. I am noticing that the Model L.R. in the lrm results is almost the same as the Chi-Square in the anova results, but not quite; the latter value is

Re: [R] difference between lrm's Model L.R. and anova's Chi-Square

2008-03-02 Thread johnson4
Quoting Frank E Harrell Jr [EMAIL PROTECTED]: anova (anova.Design) computes Wald statistics. When the log-likelihood is very quadratic, these statistics will be very close to log-likelihood ratio chi-square statistics. In general LR chi-square tests are better; we use Wald tests for speed.

Re: [R] difference between lrm's Model L.R. and anova's Chi-Square

2008-03-02 Thread Frank E Harrell Jr
[EMAIL PROTECTED] wrote: Quoting Frank E Harrell Jr [EMAIL PROTECTED]: anova (anova.Design) computes Wald statistics. When the log-likelihood is very quadratic, these statistics will be very close to log-likelihood ratio chi-square statistics. In general LR chi-square tests are better; we

[R] difference between lrm's Model L.R. and anova's Chi-Square

2008-03-01 Thread johnson4
I am running lrm() with a single factor. I then run anova() on the fitted model to obtain a p-value associated with having that factor in the model. I am noticing that the Model L.R. in the lrm results is almost the same as the Chi-Square in the anova results, but not quite; the latter value is

Re: [R] difference between lrm's Model L.R. and anova's Chi-Square

2008-03-01 Thread Frank E Harrell Jr
[EMAIL PROTECTED] wrote: I am running lrm() with a single factor. I then run anova() on the fitted model to obtain a p-value associated with having that factor in the model. I am noticing that the Model L.R. in the lrm results is almost the same as the Chi-Square in the anova results, but

[R] difference between lme and lmer in df calculation

2008-02-17 Thread Jarrett Byrnes
Hello all. I'm currently working with mixed models, and have noticed a curious difference between the nlme and lmer packages. While I realize that model selection with mixed models is a tricky issue, the two packages currently produce different AIC scores for the same model, but they

[R] Difference between P.Value and adj.P.Value

2008-02-11 Thread Schmitt, Corinna
Hallo, fit12-lmFit(qrg[,1:2]) t12-toptable(fit12,adjust=fdr,number=25,genelist=qrg$genes[,1]) t12 ID logFC t P.Value adj.P.ValB 522PLAU_OP -6.836144 -8.420414 5.589416e-05 0.01212520 2.054965 1555 CD44_WIZ -6.569622 -8.227938 6.510169e-05 0.01212520

Re: [R] Difference between P.Value and adj.P.Value

2008-02-11 Thread john seers (IFR)
To: r-help@r-project.org Subject: [R] Difference between P.Value and adj.P.Value Hallo, fit12-lmFit(qrg[,1:2]) t12-toptable(fit12,adjust=fdr,number=25,genelist=qrg$genes[,1]) t12 ID logFC t P.Value adj.P.ValB 522PLAU_OP -6.836144 -8.420414 5.589416e-05

[R] Difference between AIC in GLM and GLS - not an R question

2007-11-27 Thread Geertje Van der Heijden
Hi, I have fitted a model using a glm() approach and using a gls() approach (but without correcting for spatially autocorrelated errors). I have noticed that although these models are the same (as they should be), the AIC value differs between glm() and gls(). Can anyone tell me why they differ?

Re: [R] Difference between AIC in GLM and GLS - not an R question

2007-11-27 Thread Prof Brian Ripley
On Tue, 27 Nov 2007, Geertje Van der Heijden wrote: I have fitted a model using a glm() approach and using a gls() approach (but without correcting for spatially autocorrelated errors). I have noticed that although these models are the same (as they should be), the AIC value differs between

Re: [R] Difference between AIC in GLM and GLS - not an R question

2007-11-27 Thread Geertje Van der Heijden
Dear Prof. Ripley, Thanks for your response! I used the REML method. If I estimate the gls models using ML estimation, the AIC values are equal. Many thanks, Geertje On Tue, 27 Nov 2007, Geertje Van der Heijden wrote: I have fitted a model using a glm() approach and using a gls() approach

Re: [R] Difference between AIC in GLM and GLS - not an R question

2007-11-27 Thread John C Frain
There are several different formulae for AIC. They are all monotone transformations of the basic penalized log likelihood or likelihood. Thus when compared over different models the maximum (or minimum) occurs at the same specification. If you use the exact same estimation technique in different

<    1   2   3