Re: [R] Converting SAS Code

2017-10-11 Thread Mitchell Maltenfort
I believe the lmerTest package's "difflsmeans" is what you need. On Wed, Oct 11, 2017 at 2:33 PM, Andrew Harmon wrote: > I have no problem setting up my mixed model, or performing anova or lsmeans > on my model’s outputs. However, performing lsd mean separation is giving me > fits. > > > > So I

Re: [R] Converting SAS Code

2017-10-11 Thread Andrew Harmon
I have no problem setting up my mixed model, or performing anova or lsmeans on my model’s outputs. However, performing lsd mean separation is giving me fits. So I do not have a problem when using two-way anova model. When using the code: fit.yield.add <- lm(data = ryzup, Yield ~ Rep + Nitrogen

Re: [R] Converting SAS Code

2017-09-30 Thread John Kane via R-help
And appropriatesly > library(fortunes) > fortune() SAS seems to be to statistical computing what Microsoft is to personal computing.    -- Bill Venables   'Exegeses on Linear Models' paper (May 2000) On Saturday, September 30, 2017, 4:57:23 PM EDT, Rolf Turner wrote: On 01/10/17 0

Re: [R] Converting SAS Code

2017-09-30 Thread Rolf Turner
On 01/10/17 01:22, Robert Baer wrote: On 9/29/2017 3:37 PM, Rolf Turner wrote: On 30/09/17 07:45, jlu...@ria.buffalo.edu wrote: The conceptual paradigm for R is only marginally commensurate with that of standard statistical software. You must immerse yourself in R to become proficient.

Re: [R] Converting SAS Code

2017-09-30 Thread peter dalgaard
> On 30 Sep 2017, at 14:22 , Robert Baer wrote: > > > > On 9/29/2017 3:37 PM, Rolf Turner wrote: >> On 30/09/17 07:45, jlu...@ria.buffalo.edu wrote: >> >> >> >>> >>> The conceptual paradigm for R is only marginally commensurate with >>> that of >>> standard statistical software. >>> You m

Re: [R] Converting SAS Code

2017-09-30 Thread Robert Baer
On 9/29/2017 3:37 PM, Rolf Turner wrote: > On 30/09/17 07:45, jlu...@ria.buffalo.edu wrote: > > > >> >> The conceptual paradigm for R is only marginally commensurate with >> that of >> standard statistical software. >> You must immerse yourself in R to become proficient. > > Fortune nomination.

Re: [R] Converting SAS Code

2017-09-29 Thread Peter Langfelder
On Fri, Sep 29, 2017 at 2:32 PM, peter dalgaard wrote: > >> On 29 Sep 2017, at 22:43 , MacQueen, Don wrote: >> >> I used to use SAS a lot, but I don't know what the line >> *Yield Champagin; >> does. > > Nothing. It's a comment... Fortune nomination! Peter

Re: [R] Converting SAS Code

2017-09-29 Thread peter dalgaard
> On 29 Sep 2017, at 22:43 , MacQueen, Don wrote: > > I used to use SAS a lot, but I don't know what the line > *Yield Champagin; > does. Nothing. It's a comment... -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark P

Re: [R] Converting SAS Code

2017-09-29 Thread MacQueen, Don
For the initial data step, assuming a data frame named stress already exists, and using base R, you can start with something like this: barcodes.to.delete <- c('16187DD4015', '16187DD6002', {complete the comma-delimited vector of barcodes you don't want} ) yield <- subset(stress, !(barcode

Re: [R] Converting SAS Code

2017-09-29 Thread Rolf Turner
On 30/09/17 07:45, jlu...@ria.buffalo.edu wrote: The conceptual paradigm for R is only marginally commensurate with that of standard statistical software. You must immerse yourself in R to become proficient. Fortune nomination. cheers, Rolf -- Technical Editor ANZJS Department of Statist

Re: [R] Converting SAS Code

2017-09-29 Thread Marc Schwartz
Hi, I would echo Bert's comments below. The last thing that you want to try to do is to convert SAS code to R code on a "line for line" basis. The programming paradigm of R, which is built upon vectorized operations, takes a "whole object" approach for efficiency. SAS does not, since it is gen

Re: [R] Converting SAS Code

2017-09-29 Thread Jeff Newmiller
All HTML emails have a plain text part along with the HTML part... but it is usually invisible to the author and is automatically generated by the email composing software and some software is better than others at that job (by a lot). However, without a doubt, sending the email in text form at

Re: [R] Converting SAS Code

2017-09-29 Thread JLucke
Gunter Sent by: "R-help" 09/29/2017 02:09 PM To "Kevin E. Thorpe" , cc R-help , Andrew Harmon Subject Re: [R] Converting SAS Code I will offer an opinion, with which others may fairly take issue. If you are coming from SAS and wish to learn R, you should forget about

Re: [R] Converting SAS Code

2017-09-29 Thread Bert Gunter
I will offer an opinion, with which others may fairly take issue. If you are coming from SAS and wish to learn R, you should forget about SAS entirely; it is ancient and convoluted. But more to the point, as others have already suggested, you will only confuse and hamstring yourself trying to conv

Re: [R] Converting SAS Code

2017-09-29 Thread Kevin E. Thorpe
Regarding point 3, as a moderator I have been helping Andrew get this post out to the list over the past week. His previous attempts were encoded in some way that the listserv rejected. He sent me the post via his gmail account and viewing the source I saw it had at least both plain test and HT

Re: [R] Converting SAS Code

2017-09-29 Thread Tobias Fellinger
Hello, in my experience the most direct path of converting SAS code to R is by using dplyr. dplyr provides the filter function, the first part of your code could look like this, assuming your datasets are stored as data.frames: library(dplyr) yield <- filter(stress, field != "YV", field !=

Re: [R] Converting SAS Code

2017-09-29 Thread Michael Dewey
You might get better answers if you 1 - break this down into separate issues 2 - tell us what you want to achieve in words rather than SAS, we all read English but few of us speak SAS 3 - post in plain text not HTML as HTML mangles your post On 29/09/2017 13:47, Andrew Harmon wrote: Hello all

[R] Converting SAS Code

2017-09-29 Thread Andrew Harmon
Hello all, My statistical analysis training up until this point has been entirely done in SAS. The code I frequently used was: *Yield Champagin; data yield; set stress; if field='YV' then delete; if field='HB' then delete; if barcode='16187DD4015' then delete; if barcode='16187DD6002' then