Re: Your paper on Stata,SAS and SPSS

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Your paper on Stata,SAS and SPSS

John F Hall
Michael

Thanks for your prompt and appreciative reply.

For the kind of students I used to teach (no previous computing, statistics
(or even much maths) I'm still not convinced about Stata.  Most of them came
from backgrounds in sociology and related subjects and Stata seems to me to
be heavily statistical.  From the syntax examples I have seen in Stata, they
would be easily put off.  However, modern students are very different: all
have their own computers or laptops and I'm targeting the ones with PCs,
Windows and Word (those with Mac and Linux will have to wait for someone to
convert my tutorials, but there's nothing to stop them having a quick peep).

I can see why some people in "survey research methods" are switching, but
they have a very narrow definition and they're more into the statistical
aspects such as sampling bias, non-response etc, rather than the substance
of the survey.  In the UK that has always been a major difference in the
definition of "survey methods".  It's unfortunate (a bit like the false
distinction between qualitative and quantitative) but I'm afraid technique
currently has dominance over content in some quarters.

There has also been an interesting exchange between a bunch of Brits on the
relationship of the then Social Science Research Council (funding agency) to
the development of quantitative methods, with special reference to
sociology.  Jennifer Platt (Emeritus Prof of Sociology, Sussex) is the
official historian of the Briitish Sociological Association and recently
presented a paper at the World Congress of Sociology, Gothenberg, in a
session for the Resarch Cttee on the History of Sociology about deliberate
attempts to change the direction of sociology.  She made the mistake of
contacting me (in my capacity as Editor of Quantitative Sociology
Newsletter, which ceased publication in 1984).  I haven't seen her for 20
years, but I have a vivid (if not always 100% accurate) memory and managed
to track down most of the people who were active in promoting or enabling
quantitative methods and/or computing in sociological research in the UK in
the 1970s.  Poor Jennifer is now buried in mounds of fascinating, detailed
and learned reminiscences!

Part of this exchange had some snide references to "plumbers" (computer and
statistics people) who could be called in to help out if thought necessary
by the superior intellects of "sociologists".  I retorted, "The late Angus
Campbell (Director of ISR, Ann Arbor) once remarked to me that you wouldn't
expect a chemist to work without knowing how to put a retort stand and tubes
together, so why should sociologists not be expected to have at least a few
basic technical skills?   At PNL I used to explain my job as teaching
sociologists how to count.  At both SSRC and PNL I and my staff upset a lot
of people by turning round jobs in 3 or 4 days (sometimes being specially
called in) that they had been messing about with (wasting taxpayers' money
or funding agency's patience)  for months, if not years, too proud or
ignorant to seek advice or assistance: others were eternally grateful, but
you can't please everyone."

There were also some snide comments about research units and centres
springing up like mushrooms to cream off research funds, but that's a whole
new story.  If anyone's interested, I can forward the relevant selections.

John Hall
http://surveyresearch.weebly.com


PS  I've copied in parts of other mails so that you and others can make
sense of your reply.

----- Original Message -----
From: Michael N. Mitchell
To: [hidden email]
Sent: Tuesday, August 10, 2010 4:41 AM
Subject: Re: Your paper on Stata,SAS and SPSS


Dear John

   Thank you so much for your email. My apologies for my delay, I have been
buried with
many things, including focusing my efforts on my book writing.

   I am delighted that you have been engaging this issue of Stata and SPSS
and have been
fostering some cross communication of the communities via the SPSSX and
Statalist
listservers. Having used both packages for many years and having followed
each list for
quite a while, I know how each community can be very isolated from one
another. And, I
especially understand the issues that the SPSS folks are dealing with and
commenting upon.
That is part of the reason for the technical report that I wrote, trying to
help people
take a wider view of what is available. For those who have access to
multiple packages, to
encourage them to use the best of each tools from each package, and for
those who are
using a single package, to consider the alternatives and to consider whether
you might
want to make the effort to switch to another that might, in the long run,
serve you better
than the package that you know. At my work, I have had multiple people make
the switch
from SPSS to Stata and very quickly they do not look back. And, the cost
difference is
astounding. For the price we pay for one SAS license or the cost of about 2
SPSS licenses
we get about 30 Stata licenses.

   I am no longer with UCLA so cannot assist with "web link exchanges", but
I am sure that
the UCLA stat group would be very interested in this. You can write to them
at
[hidden email] .

Warmest regards,

Michael N. Mitchell
Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week         - http://www.MichaelNormanMitchell.com



On 2010-08-05 10.31 PM, [hidden email] wrote:

> Michael
>
> to A desperate user in Spain whose university will discontinue SPSS 15
> next year and not rplace it.  She started a huge and ferocious debate on
> the on the SPSSX listserver about IBM/SPSS business models etc.  In a
> reply someone just posted the link to your paper.
>
> I haven't worked through it yet, but from the thoughts in your abstract
> and acknowledgments I detect a kindred spirit working in familiar
> territory.
>
> I have used SPSS on dozens of surveys and thousands of queries since 1972
> and am currently working on a stack of learning materials from the
> postgraduate Survey Analysis Workshop (part-time, evening) I designed and
> taught from 1976 until I (early) retired in 1992.
>
> These were for various releases of SPSS on a range of machines culminating
> in SPSS-X 4 on a Vax cluster.  Since 2006 I have been updating and
> expending these to use with SPSS for Windows on a PC (which involves
> conversion from WordStar4 to Word and a switch from DOS to Windows,
> neither of which I had ever used before).
>
> Since September last year I have been developing a new website and have
> now uploaded a substantial body of entry-level SPSS tutorials, exercises
> and specimen answers.  They use syntax in preference to the drop-down
> menus, but many examples are also repeated using the menus.  They are
> oriented towards survey research rather than statistics and are aimed at
> teachers, researchers and students with little or no previous experience
> of statistics (a sort of "Clod's Guide to Survey Analysis Using SPSS").
> So far have avoided using a single equation, but that may have to come
> when I get round to explaining inferential statistics in the later stages
> of the course.
>
> There are many SPSS courses around, but mine is different, and perhaps
> more fun.  The website is http://surveyresearch.weebly.com/index.html and
> as well as SPSS it it also carries a wealth of research reports and other
> materials.
>
> Many of my colleagues in the UK are now switching to Stata, but I think
> SPSS is far more suited to the kind of material I'm handling.  However,
> I'd be interested in seeing parallel Stata syntax and output for some of
> my examples.
>
> I already have a link to ATS on my SPSS intros and tutorials page
> http://surveyresearch.weebly.com/spss-intros-and-tutorials.html.  Once
> I've had a look at your paper, would you be happy for me to add a link to
> it from my site?
>
> Finally, there's an account of how I got into all this in my Old Dog, Old
> Tricks presentation
> (http://surveyresearch.weebly.com/7-old-dog-old-tricks.html) and the first
> slide show is fun.  There are also two extended critical reviews of Julie
> Pallant's "SPSS Survival Manual" (2001 and 2005, both different) on
> http://surveyresearch.weebly.com/8-spss-text-books.html
>
> Regards
> John Hall

----- Original Message -----
From: John F Hall
To: Various people in computing, stats and quant method in sociology
Sent: Saturday, August 07, 2010 9:33 AM
Subject: SPSS, SAS and Stata


I've read through the Mitchell article and it is more relevant to
statististical aspects of surveys than to the sorts of things I cover in my
tutorials.  It's very thorough, but there are no tables or figures showing
direct comparisons of syntax or output from SPSS, SAS and Stata.  I'll add
a link from my site, but I already have one to ATS at UCLA.

John Hall
http://surveyresearch.weebly.com



----- Original Message -----
From: John F Hall
To: Reason Dave
Cc: Various people in computing, stats and quant method in sociologySent:
Friday, August 06, 2010 6:31 PM
Subject: Sociologists and plumbers


Dave

Just came across this opening paragraph in an article (link posted to SPSSX
listserver by Dirk Enzmann)

There's huge debate going on about the relative merits of SPSS vs Stata and
R, much of it an attack on the IBM/SPSS business model which is beginning to
put SPSS out of the reach of many universities as well as students.  Many
users are now switching to Stata, thus losing a whole generation of students
and future users forever.  There are some heartbreaking, extensive,
thoughtful and constructive contributions on the thread inexpensive 'home'
version? started by Peter Neenan [hidden email]

Mitchell, M. N. (2005). Strategically using General Purpose Statistics
Packages: A Look at Stata, SAS and
SPSS (Technical Report Series, Report Number 1, Version Number 1).
Statistical Consulting Group:
UCLA Academic Technology Services. Available at
http://www.ats.ucla.edu/stat/technicalreports/

This report describes my experiences using statistical packages over the
last 20+ years, including my ex-
periences as a statistical consultant at UCLA for more than 11 years. As a
statistical consultant, I have
worked with thousands of researchers and have worked with well over a dozen
packages. In any given day,
I bounce from helping people using Stata, then SAS, then SPSS, or Mplus,
perhaps HLM, maybe LogXact,
perhaps LatentGOLD, maybe MLwiN and so forth. I have seen how certain
packages have certain strengths
and others have certain weaknesses, and that these strengths and weaknesses
fall along a large number of
dimensions. I have come to believe that data analysts are like carpenters
and that statistical software makes
up the tools that we use. A carpenter would not buy a screwdriver and
conclude that his or her toolkit
is complete. Likewise, as data analysts, we may need to draw upon multiple
tools (statistical packages) to
form a complete toolkit based on the kind of work each of us performs.

The article was updated in 2007: he's still working at UCLA and is a regular
contributor to Stata listerver.  I thought the carpenter analogy
appropriate, given your remarks about plumbers and sociologists.  From the
abstract and his acknowledgments, I detect a kindred spirit working in an
environment not unlike SSRC and PNL.

John

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Your paper on Stata,SAS and SPSS

Michael N. Mitchell
Dear All

   The reply that you read from me was written privately from myself to John Hall. I
wanted to offer encouragement, information and advice after his initial email contacting
me. I had no idea that my personal email to him would be reposted without my permission to
both the SPSSX list and Statalist. While I do not feel that anything in my email was
particularly unfit for public distribution, it is not the sort of information I would have
voluntarily shared publicly and kindly request that people treat that as a misdirected
email that should not have been sent, is best ignored, and certainly not forwarded.

   While I admire the spirit of trying to join forces over common issues between the list,
I think it violates the spirit and perhaps letter of the FAQs governing the lists to
reproduce private conversations without permission.  There is plenty of common ground to
be found from public statements and public dialogue.

Warmest regards,

Michael N. Mitchell
Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week         - http://www.MichaelNormanMitchell.com



On 2010-08-10 2.02 AM, John F Hall wrote:

> Michael
>
> Thanks for your prompt and appreciative reply.
>
> For the kind of students I used to teach (no previous computing,
> statistics (or even much maths) I'm still not convinced about Stata.
> Most of them came from backgrounds in sociology and related subjects and
> Stata seems to me to be heavily statistical. From the syntax examples I
> have seen in Stata, they would be easily put off. However, modern
> students are very different: all have their own computers or laptops and
> I'm targeting the ones with PCs, Windows and Word (those with Mac and
> Linux will have to wait for someone to convert my tutorials, but there's
> nothing to stop them having a quick peep).
>
> I can see why some people in "survey research methods" are switching,
> but they have a very narrow definition and they're more into the
> statistical aspects such as sampling bias, non-response etc, rather than
> the substance of the survey. In the UK that has always been a major
> difference in the definition of "survey methods". It's unfortunate (a
> bit like the false distinction between qualitative and quantitative) but
> I'm afraid technique currently has dominance over content in some quarters.
>
> There has also been an interesting exchange between a bunch of Brits on
> the relationship of the then Social Science Research Council (funding
> agency) to the development of quantitative methods, with special
> reference to sociology. Jennifer Platt (Emeritus Prof of Sociology,
> Sussex) is the official historian of the Briitish Sociological
> Association and recently presented a paper at the World Congress of
> Sociology, Gothenberg, in a session for the Resarch Cttee on the History
> of Sociology about deliberate attempts to change the direction of
> sociology. She made the mistake of contacting me (in my capacity as
> Editor of Quantitative Sociology Newsletter, which ceased publication in
> 1984). I haven't seen her for 20 years, but I have a vivid (if not
> always 100% accurate) memory and managed to track down most of the
> people who were active in promoting or enabling quantitative methods
> and/or computing in sociological research in the UK in the 1970s. Poor
> Jennifer is now buried in mounds of fascinating, detailed and learned
> reminiscences!
>
> Part of this exchange had some snide references to "plumbers" (computer
> and statistics people) who could be called in to help out if thought
> necessary by the superior intellects of "sociologists". I retorted, "The
> late Angus Campbell (Director of ISR, Ann Arbor) once remarked to me
> that you wouldn't expect a chemist to work without knowing how to put a
> retort stand and tubes together, so why should sociologists not be
> expected to have at least a few basic technical skills? At PNL I used to
> explain my job as teaching sociologists how to count. At both SSRC and
> PNL I and my staff upset a lot of people by turning round jobs in 3 or 4
> days (sometimes being specially called in) that they had been messing
> about with (wasting taxpayers' money or funding agency's patience) for
> months, if not years, too proud or ignorant to seek advice or
> assistance: others were eternally grateful, but you can't please everyone."
>
> There were also some snide comments about research units and centres
> springing up like mushrooms to cream off research funds, but that's a
> whole new story. If anyone's interested, I can forward the relevant
> selections.
>
> John Hall
> http://surveyresearch.weebly.com
>
>
> PS I've copied in parts of other mails so that you and others can make
> sense of your reply.
>
> ----- Original Message ----- From: Michael N. Mitchell
> To: [hidden email]
> Sent: Tuesday, August 10, 2010 4:41 AM
> Subject: Re: Your paper on Stata,SAS and SPSS
>
>
> Dear John
>
> Thank you so much for your email. My apologies for my delay, I have been
> buried with
> many things, including focusing my efforts on my book writing.
>
> I am delighted that you have been engaging this issue of Stata and SPSS
> and have been
> fostering some cross communication of the communities via the SPSSX and
> Statalist
> listservers. Having used both packages for many years and having
> followed each list for
> quite a while, I know how each community can be very isolated from one
> another. And, I
> especially understand the issues that the SPSS folks are dealing with
> and commenting upon.
> That is part of the reason for the technical report that I wrote, trying
> to help people
> take a wider view of what is available. For those who have access to
> multiple packages, to
> encourage them to use the best of each tools from each package, and for
> those who are
> using a single package, to consider the alternatives and to consider
> whether you might
> want to make the effort to switch to another that might, in the long
> run, serve you better
> than the package that you know. At my work, I have had multiple people
> make the switch
> from SPSS to Stata and very quickly they do not look back. And, the cost
> difference is
> astounding. For the price we pay for one SAS license or the cost of
> about 2 SPSS licenses
> we get about 30 Stata licenses.
>
> I am no longer with UCLA so cannot assist with "web link exchanges", but
> I am sure that
> the UCLA stat group would be very interested in this. You can write to
> them at
> [hidden email] .
>
> Warmest regards,
>
> Michael N. Mitchell
> Data Management Using Stata - http://www.stata.com/bookstore/dmus.html
> A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
> Stata tidbit of the week - http://www.MichaelNormanMitchell.com
>
>
>
> On 2010-08-05 10.31 PM, [hidden email] wrote:
>> Michael
>>
>> to A desperate user in Spain whose university will discontinue SPSS 15
>> next year and not rplace it. She started a huge and ferocious debate
>> on the on the SPSSX listserver about IBM/SPSS business models etc. In
>> a reply someone just posted the link to your paper.
>>
>> I haven't worked through it yet, but from the thoughts in your
>> abstract and acknowledgments I detect a kindred spirit working in
>> familiar territory.
>>
>> I have used SPSS on dozens of surveys and thousands of queries since
>> 1972 and am currently working on a stack of learning materials from
>> the postgraduate Survey Analysis Workshop (part-time, evening) I
>> designed and taught from 1976 until I (early) retired in 1992.
>>
>> These were for various releases of SPSS on a range of machines
>> culminating in SPSS-X 4 on a Vax cluster. Since 2006 I have been
>> updating and expending these to use with SPSS for Windows on a PC
>> (which involves conversion from WordStar4 to Word and a switch from
>> DOS to Windows, neither of which I had ever used before).
>>
>> Since September last year I have been developing a new website and
>> have now uploaded a substantial body of entry-level SPSS tutorials,
>> exercises and specimen answers. They use syntax in preference to the
>> drop-down menus, but many examples are also repeated using the menus.
>> They are oriented towards survey research rather than statistics and
>> are aimed at teachers, researchers and students with little or no
>> previous experience of statistics (a sort of "Clod's Guide to Survey
>> Analysis Using SPSS"). So far have avoided using a single equation,
>> but that may have to come when I get round to explaining inferential
>> statistics in the later stages of the course.
>>
>> There are many SPSS courses around, but mine is different, and perhaps
>> more fun. The website is http://surveyresearch.weebly.com/index.html
>> and as well as SPSS it it also carries a wealth of research reports
>> and other materials.
>>
>> Many of my colleagues in the UK are now switching to Stata, but I
>> think SPSS is far more suited to the kind of material I'm handling.
>> However, I'd be interested in seeing parallel Stata syntax and output
>> for some of my examples.
>>
>> I already have a link to ATS on my SPSS intros and tutorials page
>> http://surveyresearch.weebly.com/spss-intros-and-tutorials.html. Once
>> I've had a look at your paper, would you be happy for me to add a link
>> to it from my site?
>>
>> Finally, there's an account of how I got into all this in my Old Dog,
>> Old Tricks presentation
>> (http://surveyresearch.weebly.com/7-old-dog-old-tricks.html) and the
>> first slide show is fun. There are also two extended critical reviews
>> of Julie Pallant's "SPSS Survival Manual" (2001 and 2005, both
>> different) on http://surveyresearch.weebly.com/8-spss-text-books.html
>>
>> Regards
>> John Hall
>
> ----- Original Message ----- From: John F Hall
> To: Various people in computing, stats and quant method in sociology
> Sent: Saturday, August 07, 2010 9:33 AM
> Subject: SPSS, SAS and Stata
>
>
> I've read through the Mitchell article and it is more relevant to
> statististical aspects of surveys than to the sorts of things I cover in
> my tutorials. It's very thorough, but there are no tables or figures
> showing direct comparisons of syntax or output from SPSS, SAS and Stata.
> I'll add a link from my site, but I already have one to ATS at UCLA.
>
> John Hall
> http://surveyresearch.weebly.com
>
>
>
> ----- Original Message ----- From: John F Hall
> To: Reason Dave
> Cc: Various people in computing, stats and quant method in
> sociologySent: Friday, August 06, 2010 6:31 PM
> Subject: Sociologists and plumbers
>
>
> Dave
>
> Just came across this opening paragraph in an article (link posted to
> SPSSX listserver by Dirk Enzmann)
>
> There's huge debate going on about the relative merits of SPSS vs Stata
> and R, much of it an attack on the IBM/SPSS business model which is
> beginning to put SPSS out of the reach of many universities as well as
> students. Many users are now switching to Stata, thus losing a whole
> generation of students and future users forever. There are some
> heartbreaking, extensive, thoughtful and constructive contributions on
> the thread inexpensive 'home' version? started by Peter Neenan
> [hidden email]
>
> Mitchell, M. N. (2005). Strategically using General Purpose Statistics
> Packages: A Look at Stata, SAS and
> SPSS (Technical Report Series, Report Number 1, Version Number 1).
> Statistical Consulting Group:
> UCLA Academic Technology Services. Available at
> http://www.ats.ucla.edu/stat/technicalreports/
>
> This report describes my experiences using statistical packages over the
> last 20+ years, including my ex-
> periences as a statistical consultant at UCLA for more than 11 years. As
> a statistical consultant, I have
> worked with thousands of researchers and have worked with well over a
> dozen packages. In any given day,
> I bounce from helping people using Stata, then SAS, then SPSS, or Mplus,
> perhaps HLM, maybe LogXact,
> perhaps LatentGOLD, maybe MLwiN and so forth. I have seen how certain
> packages have certain strengths
> and others have certain weaknesses, and that these strengths and
> weaknesses fall along a large number of
> dimensions. I have come to believe that data analysts are like
> carpenters and that statistical software makes
> up the tools that we use. A carpenter would not buy a screwdriver and
> conclude that his or her toolkit
> is complete. Likewise, as data analysts, we may need to draw upon
> multiple tools (statistical packages) to
> form a complete toolkit based on the kind of work each of us performs.
>
> The article was updated in 2007: he's still working at UCLA and is a
> regular contributor to Stata listerver. I thought the carpenter analogy
> appropriate, given your remarks about plumbers and sociologists. From
> the abstract and his acknowledgments, I detect a kindred spirit working
> in an environment not unlike SSRC and PNL.
>
> John
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Your paper on Stata,SAS and SPSS

David Hitchin-2
In reply to this post by John F Hall
At 10:02 10/08/2010, John F Hall wrote:

>Part of this exchange had some snide references to "plumbers"
>(computer and statistics people) who could be called in to help out
>if thought necessary by the superior intellects of
>"sociologists".  I retorted, "The late Angus Campbell (Director of
>ISR, Ann Arbor) once remarked to me that you wouldn't expect a
>chemist to work without knowing how to put a retort stand and tubes
>together, so why should sociologists not be expected to have at
>least a few basic technical skills?

Agreed, but when I started work at a university more than 40 years
ago, one of the highest-paid people was the glassblower in Chemistry.

David Hitchin

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: st: Re: Your paper on Stata,SAS and SPSS

Alan Acock
In reply to this post by John F Hall
John Hall indicates that with the limited math/statistics background of his students, the "syntax examples I have seen in Stata, . . . would easily put (them) off." I'm not sure what examples John has seen. Often those shared on statalist are technical and not appropriate to beginning students. If you think about a basic introductory research courses in the social sciences, the actual Stata commands that would be relevant are vastly simpler than those used in SPSS or SAS. For SPSS readers who don't appreciate this, here are a few
examples they might compare to the lengthy syntax needed by SPSS

(chi-square test)
.table var1 var2, chi2

(independent t-test)
.ttest var1 var2

(grouped t-test)
.ttest var1, by(gender)

(Correlation matrix)
.corr var1 - var10

(OLS regression)
.regress y x1 x2 x3, beta

(logistic regression)
.logit y x1 x2 x3, or

If they get a little more advanced and do a Poisson regression, compare the SPSS command to do a Poisson regression to Stata's--Really--try it in SPSS
.poisson y x1 x2 x3

How about doing a principal component "factor" analysis--the default type in SPSS. In Stata the command is:
.factor x1 -x10, pcf
Then, if you want a varimax rotation you have the post estimation command
.rotate

Stata's goal is "type a little, get a little." The output wastes far less space than does SPSS. There are options and post estimation commands for more advance users. For example, if you want alpha for a 10-item sale you would enter
.alpha var1 - var10
If you wanted item analysis like SPSS or SAS provide, you would enter
.alpha var1 - var10, item

Of course, Stata has excellent menus, but the reason Stata users don't use them as much as SPSS users is less the acknowledged elegance of the SPSS menus than it is the rigid structure of Stata commands resulting in much simpler command structure (syntax) than is found in SPSS. I suspect that if John listed all the procedures he taught in his research methods course, the Stata commands could be all listed on a single page.

Although Stata is vastly more powerful than SPSS for advanced statistical applications (as well as a fraction of the cost), Stata is also much less cumbersome for elementary applications. I was motivated to write my "Gentle Introduction to Stata" (StataPress), because many books about Stata focused on advanced applications and many social/behavioral scientists had the notion that Stata was just for advanced users. I believe that the advantages of Stata are even greater for beginners--not to mention offering them greater opportunity for growth.

Alan Acock


On Aug 10, 2010, at Tue Aug 5 2:02 , John F Hall wrote:

> Michael
>
> Thanks for your prompt and appreciative reply.
>
> For the kind of students I used to teach (no previous computing, statistics (or even much maths) I'm still not convinced about Stata.  Most of them came from backgrounds in sociology and related subjects and Stata seems to me to be heavily statistical.  From the syntax examples I have seen in Stata, they would be easily put off.  However, modern students are very different: all have their own computers or laptops and I'm targeting the ones with PCs, Windows and Word (those with Mac and Linux will have to wait for someone to convert my tutorials, but there's nothing to stop them having a quick peep).
>
> I can see why some people in "survey research methods" are switching, but they have a very narrow definition and they're more into the statistical aspects such as sampling bias, non-response etc, rather than the substance of the survey.  In the UK that has always been a major difference in the definition of "survey methods".  It's unfortunate (a bit like the false distinction between qualitative and quantitative) but I'm afraid technique currently has dominance over content in some quarters.
>
> There has also been an interesting exchange between a bunch of Brits on the relationship of the then Social Science Research Council (funding agency) to the development of quantitative methods, with special reference to sociology.  Jennifer Platt (Emeritus Prof of Sociology, Sussex) is the official historian of the Briitish Sociological Association and recently presented a paper at the World Congress of Sociology, Gothenberg, in a session for the Resarch Cttee on the History of Sociology about deliberate attempts to change the direction of sociology.  She made the mistake of contacting me (in my capacity as Editor of Quantitative Sociology Newsletter, which ceased publication in 1984).  I haven't seen her for 20 years, but I have a vivid (if not always 100% accurate) memory and managed to track down most of the people who were active in promoting or enabling quantitative methods and/or computing in sociological research in the UK in the 1970s.  Poor Jennifer is now buried !
 in mounds of fascinating, detailed and learned reminiscences!

>
> Part of this exchange had some snide references to "plumbers" (computer and statistics people) who could be called in to help out if thought necessary by the superior intellects of "sociologists".  I retorted, "The late Angus Campbell (Director of ISR, Ann Arbor) once remarked to me that you wouldn't expect a chemist to work without knowing how to put a retort stand and tubes together, so why should sociologists not be expected to have at least a few basic technical skills?   At PNL I used to explain my job as teaching sociologists how to count.  At both SSRC and PNL I and my staff upset a lot of people by turning round jobs in 3 or 4 days (sometimes being specially called in) that they had been messing about with (wasting taxpayers' money or funding agency's patience)  for months, if not years, too proud or ignorant to seek advice or assistance: others were eternally grateful, but you can't please everyone."
>
> There were also some snide comments about research units and centres springing up like mushrooms to cream off research funds, but that's a whole new story.  If anyone's interested, I can forward the relevant selections.
>
> John Hall
> http://surveyresearch.weebly.com
>
>
> PS  I've copied in parts of other mails so that you and others can make sense of your reply.
>
> ----- Original Message ----- From: Michael N. Mitchell
> To: [hidden email]
> Sent: Tuesday, August 10, 2010 4:41 AM
> Subject: Re: Your paper on Stata,SAS and SPSS
>
>
> Dear John
>
>  Thank you so much for your email. My apologies for my delay, I have been buried with
> many things, including focusing my efforts on my book writing.
>
>  I am delighted that you have been engaging this issue of Stata and SPSS and have been
> fostering some cross communication of the communities via the SPSSX and Statalist
> listservers. Having used both packages for many years and having followed each list for
> quite a while, I know how each community can be very isolated from one another. And, I
> especially understand the issues that the SPSS folks are dealing with and commenting upon.
> That is part of the reason for the technical report that I wrote, trying to help people
> take a wider view of what is available. For those who have access to multiple packages, to
> encourage them to use the best of each tools from each package, and for those who are
> using a single package, to consider the alternatives and to consider whether you might
> want to make the effort to switch to another that might, in the long run, serve you better
> than the package that you know. At my work, I have had multiple people make the switch
> from SPSS to Stata and very quickly they do not look back. And, the cost difference is
> astounding. For the price we pay for one SAS license or the cost of about 2 SPSS licenses
> we get about 30 Stata licenses.
>
>  I am no longer with UCLA so cannot assist with "web link exchanges", but I am sure that
> the UCLA stat group would be very interested in this. You can write to them at
> [hidden email] .
>
> Warmest regards,
>
> Michael N. Mitchell
> Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
> A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
> Stata tidbit of the week         - http://www.MichaelNormanMitchell.com
>
>
>
> On 2010-08-05 10.31 PM, [hidden email] wrote:
>> Michael
>>
>> to A desperate user in Spain whose university will discontinue SPSS 15 next year and not rplace it.  She started a huge and ferocious debate on the on the SPSSX listserver about IBM/SPSS business models etc.  In a reply someone just posted the link to your paper.
>>
>> I haven't worked through it yet, but from the thoughts in your abstract and acknowledgments I detect a kindred spirit working in familiar territory.
>>
>> I have used SPSS on dozens of surveys and thousands of queries since 1972 and am currently working on a stack of learning materials from the postgraduate Survey Analysis Workshop (part-time, evening) I designed and taught from 1976 until I (early) retired in 1992.
>>
>> These were for various releases of SPSS on a range of machines culminating in SPSS-X 4 on a Vax cluster.  Since 2006 I have been updating and expending these to use with SPSS for Windows on a PC (which involves conversion from WordStar4 to Word and a switch from DOS to Windows, neither of which I had ever used before).
>>
>> Since September last year I have been developing a new website and have now uploaded a substantial body of entry-level SPSS tutorials, exercises and specimen answers.  They use syntax in preference to the drop-down menus, but many examples are also repeated using the menus.  They are oriented towards survey research rather than statistics and are aimed at teachers, researchers and students with little or no previous experience of statistics (a sort of "Clod's Guide to Survey Analysis Using SPSS"). So far have avoided using a single equation, but that may have to come when I get round to explaining inferential statistics in the later stages of the course.
>>
>> There are many SPSS courses around, but mine is different, and perhaps more fun.  The website is http://surveyresearch.weebly.com/index.html and as well as SPSS it it also carries a wealth of research reports and other materials.
>>
>> Many of my colleagues in the UK are now switching to Stata, but I think SPSS is far more suited to the kind of material I'm handling.  However, I'd be interested in seeing parallel Stata syntax and output for some of my examples.
>>
>> I already have a link to ATS on my SPSS intros and tutorials page http://surveyresearch.weebly.com/spss-intros-and-tutorials.html.  Once I've had a look at your paper, would you be happy for me to add a link to it from my site?
>>
>> Finally, there's an account of how I got into all this in my Old Dog, Old Tricks presentation (http://surveyresearch.weebly.com/7-old-dog-old-tricks.html) and the first slide show is fun.  There are also two extended critical reviews of Julie Pallant's "SPSS Survival Manual" (2001 and 2005, both different) on http://surveyresearch.weebly.com/8-spss-text-books.html
>>
>> Regards
>> John Hall
>
> ----- Original Message ----- From: John F Hall
> To: Various people in computing, stats and quant method in sociology
> Sent: Saturday, August 07, 2010 9:33 AM
> Subject: SPSS, SAS and Stata
>
>
> I've read through the Mitchell article and it is more relevant to statististical aspects of surveys than to the sorts of things I cover in my tutorials.  It's very thorough, but there are no tables or figures showing direct comparisons of syntax or output from SPSS, SAS and Stata.  I'll add a link from my site, but I already have one to ATS at UCLA.
>
> John Hall
> http://surveyresearch.weebly.com
>
>
>
> ----- Original Message ----- From: John F Hall
> To: Reason Dave
> Cc: Various people in computing, stats and quant method in sociologySent: Friday, August 06, 2010 6:31 PM
> Subject: Sociologists and plumbers
>
>
> Dave
>
> Just came across this opening paragraph in an article (link posted to SPSSX listserver by Dirk Enzmann)
>
> There's huge debate going on about the relative merits of SPSS vs Stata and R, much of it an attack on the IBM/SPSS business model which is beginning to put SPSS out of the reach of many universities as well as students.  Many users are now switching to Stata, thus losing a whole generation of students and future users forever.  There are some heartbreaking, extensive, thoughtful and constructive contributions on the thread inexpensive 'home' version? started by Peter Neenan [hidden email]
>
> Mitchell, M. N. (2005). Strategically using General Purpose Statistics Packages: A Look at Stata, SAS and
> SPSS (Technical Report Series, Report Number 1, Version Number 1). Statistical Consulting Group:
> UCLA Academic Technology Services. Available at http://www.ats.ucla.edu/stat/technicalreports/
>
> This report describes my experiences using statistical packages over the last 20+ years, including my ex-
> periences as a statistical consultant at UCLA for more than 11 years. As a statistical consultant, I have
> worked with thousands of researchers and have worked with well over a dozen packages. In any given day,
> I bounce from helping people using Stata, then SAS, then SPSS, or Mplus, perhaps HLM, maybe LogXact,
> perhaps LatentGOLD, maybe MLwiN and so forth. I have seen how certain packages have certain strengths
> and others have certain weaknesses, and that these strengths and weaknesses fall along a large number of
> dimensions. I have come to believe that data analysts are like carpenters and that statistical software makes
> up the tools that we use. A carpenter would not buy a screwdriver and conclude that his or her toolkit
> is complete. Likewise, as data analysts, we may need to draw upon multiple tools (statistical packages) to
> form a complete toolkit based on the kind of work each of us performs.
>
> The article was updated in 2007: he's still working at UCLA and is a regular contributor to Stata listerver.  I thought the carpenter analogy appropriate, given your remarks about plumbers and sociologists.  From the abstract and his acknowledgments, I detect a kindred spirit working in an environment not unlike SSRC and PNL.
>
> John
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: st: Re: Your paper on Stata,SAS and SPSS

John F Hall
Alan

I only joined the list two days ago, so I haven't had a chance to find much
Stata syntax to set alongside SPSS.  Listers have sent one or two
one-liners, but with no accompanying output examples.

I'm talking about reading from a raw data matrix, adding variable and value
labels, declaring missing values, data transformations, index construction
and the like (possibly via correlation) followed by simple analysis like
frequency counts, barcharts and contingency tables using %%, not fancy
multivariate inferential statistics.  Had I still been teaching, that would
have come much later in my course, but far too late for the survey report
that had to be on the client's desk by yesterday.

You're welcome to download data sets and tutorials from my site and offer
Stata examples to set alongside the SPSS syntax and output (no GUI for me:
far too cumbersome, complex and tiresome).

John Hall
http://surveyresearch.weebly.com

----- Original Message -----
From: Alan Acock
To: [hidden email]
Cc: [hidden email] ; [hidden email] ; Bruce
Weaver
Sent: Tuesday, August 10, 2010 5:43 PM
Subject: Re: st: Re: Your paper on Stata,SAS and SPSS



John Hall indicates that with the limited math/statistics background of his
students, the "syntax examples I have seen in Stata, . . . would easily put
(them) off." I'm not sure what examples John has seen. Often those shared on
statalist are technical and not appropriate to beginning students. If you
think about a basic introductory research courses in the social sciences,
the actual Stata commands that would be relevant are vastly simpler than
those used in SPSS or SAS. For SPSS readers who don't appreciate this, here
are a few
examples they might compare to the lengthy syntax needed by SPSS

(chi-square test)
.table var1 var2, chi2

(independent t-test)
.ttest var1 var2

(grouped t-test)
.ttest var1, by(gender)

(Correlation matrix)
.corr var1 - var10

(OLS regression)
.regress y x1 x2 x3, beta

(logistic regression)
.logit y x1 x2 x3, or

If they get a little more advanced and do a Poisson regression, compare the
SPSS command to do a Poisson regression to Stata's--Really--try it in SPSS
.poisson y x1 x2 x3

How about doing a principal component "factor" analysis--the default type in
SPSS. In Stata the command is:
.factor x1 -x10, pcf
Then, if you want a varimax rotation you have the post estimation command
.rotate

Stata's goal is "type a little, get a little." The output wastes far less
space than does SPSS. There are options and post estimation commands for
more advance users. For example, if you want alpha for a 10-item sale you
would enter
.alpha var1 - var10
If you wanted item analysis like SPSS or SAS provide, you would enter
.alpha var1 - var10, item

Of course, Stata has excellent menus, but the reason Stata users don't use
them as much as SPSS users is less the acknowledged elegance of the SPSS
menus than it is the rigid structure of Stata commands resulting in much
simpler command structure (syntax) than is found in SPSS. I suspect that if
John listed all the procedures he taught in his research methods course, the
Stata commands could be all listed on a single page.

Although Stata is vastly more powerful than SPSS for advanced statistical
applications (as well as a fraction of the cost), Stata is also much less
cumbersome for elementary applications. I was motivated to write my "Gentle
Introduction to Stata" (StataPress), because many books about Stata focused
on advanced applications and many social/behavioral scientists had the
notion that Stata was just for advanced users. I believe that the advantages
of Stata are even greater for beginners--not to mention offering them
greater opportunity for growth.

Alan Acock

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: st: Re: Your paper on Stata,SAS and SPSS

Alan Acock
On Aug 10, 2010, at Tue Aug 5 12:48 , John F Hall wrote:
> Alan
>
> I only joined the list two days ago, so I haven't had a chance to find much Stata syntax to set alongside SPSS.  Listers have sent one or two one-liners, but with no accompanying output examples.
> I'm talking about reading from a raw data matrix, adding variable and value labels, declaring missing values, data transformations, index construction and the like (possibly via correlation) followed by simple analysis like frequency counts, barcharts and contingency tables using %%, not fancy multivariate inferential statistics.  Had I still been teaching, that would have come much later in my course, but far too late for the survey report that had to be on the client's desk by yesterday.
> You're welcome to download data sets and tutorials from my site and offer Stata examples to set alongside the SPSS syntax and output (no GUI for me: far too cumbersome, complex and tiresome).
> John Hall
> http://surveyresearch.weebly.com

John,

To read the following you should have a fixed font, e.g., courier, and may have some problems if your email system raps lines around.

I sent one line commands because that is how simple the syntax is. Here is a complete program. The dataset is installed on your PC when you install Stata. It is called auto.dta.

Here is the entire program:
********begin*********
sysuse auto
tab foreign
fre foreign
ttest mpg, by(foreign)
tab rep78 foreign, col chi2 V
pwcorr weight trunk headroom length price, obs sig
regress price weight trunk headroom length, beta
********end***********

Let me elaborate.

The sysuse auto installs the sample datasets that come with the Stata program.
The tab foreign does a frequency distribution--
==========
. tab foreign

  Car type |      Freq.     Percent        Cum.
------------+-----------------------------------
  Domestic |         52       70.27       70.27
   Foreign |         22       29.73      100.00
------------+-----------------------------------
     Total |         74      100.00
==========

I prefer the frequency distribution output that SPSS has. A user wrote a command, fre, that does this. From the Stata command line you can say findit fre and follow the link to install it (with one click). Here is what you get with that command: As an SPSS person you probably also prefer this output
===========
. fre foreign

foreign -- Car type
----------------------------------------------------------------
                  |      Freq.    Percent      Valid       Cum.
-------------------+--------------------------------------------
Valid   0 Domestic |         52      70.27      70.27      70.27
       1 Foreign  |         22      29.73      29.73     100.00
       Total      |         74     100.00     100.00
---------------------------------------------------------------
===========

As an example of an independent t-test you may want to know if price is significantly different depending on whether the car is domestic (U.S.) or foreign (not U.S.). The ttest command gives you this
===========
. ttest mpg, by(foreign)

Two-sample t test with equal variances
------------------------------------------------------------------------------
  Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
Domestic |      52    19.82692     .657777    4.743297    18.50638    21.14747
Foreign |      22    24.77273     1.40951    6.611187    21.84149    27.70396
---------+--------------------------------------------------------------------
combined |      74     21.2973    .6725511    5.785503     19.9569    22.63769
---------+--------------------------------------------------------------------
   diff |           -4.945804    1.362162               -7.661225   -2.230384
------------------------------------------------------------------------------
   diff = mean(Domestic) - mean(Foreign)                         t =  -3.6308
Ho: diff = 0                                     degrees of freedom =       72

   Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
Pr(T < t) = 0.0003         Pr(|T| > |t|) = 0.0005          Pr(T > t) = 0.9997

In order to do a what SPSS calls a crosstabulation of two variables and get a chi-square test and Cramer's V
you use the next one line command:
===========

. tab rep78 foreign, col chi2 V

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

   Repair |
   Record |       Car type
     1978 |  Domestic    Foreign |     Total
-----------+----------------------+----------
        1 |         2          0 |         2
          |      4.17       0.00 |      2.90
-----------+----------------------+----------
        2 |         8          0 |         8
          |     16.67       0.00 |     11.59
-----------+----------------------+----------
        3 |        27          3 |        30
          |     56.25      14.29 |     43.48
-----------+----------------------+----------
        4 |         9          9 |        18
          |     18.75      42.86 |     26.09
-----------+----------------------+----------
        5 |         2          9 |        11
          |      4.17      42.86 |     15.94
-----------+----------------------+----------
    Total |        48         21 |        69
          |    100.00     100.00 |    100.00

         Pearson chi2(4) =  27.2640   Pr = 0.000
              Cramér's V =   0.6286
==============

If you want a correlation matrix with the pairwise N and the level of significance you use the next line
==============
. pwcorr weight trunk headroom length price, obs sig

            |   weight    trunk headroom   length    price
-------------+---------------------------------------------
     weight |   1.0000
            |
            |       74
            |
      trunk |   0.6722   1.0000
            |   0.0000
            |       74       74
            |
   headroom |   0.4835   0.6620   1.0000
            |   0.0000   0.0000
            |       74       74       74
            |
     length |   0.9460   0.7266   0.5163   1.0000
            |   0.0000   0.0000   0.0000
            |       74       74       74       74
            |
      price |   0.5386   0.3143   0.1145   0.4318   1.0000
            |   0.0000   0.0064   0.3313   0.0001
            |       74       74       74       74       74
==============

If you want to do a simple multiple regression and get R-square, B's, beta's, etc.
==============
. regress price weight trunk headroom length, beta

     Source |       SS       df       MS              Number of obs =      74
-------------+------------------------------           F(  4,    69) =   10.20
      Model |   236016580     4    59004145           Prob > F      =  0.0000
   Residual |   399048816    69  5783316.17           R-squared     =  0.3716
-------------+------------------------------           Adj R-squared =  0.3352
      Total |   635065396    73  8699525.97           Root MSE      =  2404.9

------------------------------------------------------------------------------
      price |      Coef.   Std. Err.      t    P>|t|                     Beta
-------------+----------------------------------------------------------------
     weight |   4.753066   1.120054     4.24   0.000                 1.252435
      trunk |   114.0859   109.9488     1.04   0.303                 .1654491
   headroom |  -711.5679   445.0204    -1.60   0.114                -.2040968
     length |  -101.7092   42.12534    -2.41   0.018                -.7678236
      _cons |   11488.47   4543.902     2.53   0.014                        .
------------------------------------------------------------------------------

==============

All of these are very basic commands for a beginning course. Stata has menus where you can point and click, but you can see why many users don't bother with these. In my book on Stata I reproduce most of the sorts of commands you cover in your tutorials. The fact that you make these available at no charge for SPSS people is very nice of you.

There are some areas where SPSS has an advantage. People doing traditional ANOVA find SPSS easier to use, for example. As far as data management goes it is a mixed thing. I work with some complex datasets so the added power of Stata is important for data management. Michael Mitchell has a great book on data management (Stata Press). Stata does use the two step process of labeling variables and some find this awkward. The advantage is that the same value labels, once defined in step one, can be applied broadly to appropriate variables.

The extensibility of Stata by users is remarkable. Some of what you see on Statalist is the code they wrote and this can be complicated even though the command is simple. For example, a user wrote a command revrs.
If I say revrs varlist (after installing the command the first time), Stata will reverse code each of the variables and reassign the value labels for them, then generate new variables with rev at the start while keeping the original variables unchanged. Some of these user written commands are extremely powerful. Scott Long, also a sociologist, wrote a one line command that runs a Poisson regression, a negative binomial regression, a zero inflated Poisson regression, and a zero inflated Negative Binomial regression. The output includes the results for each of these and a table helping you decide which model fits the data best. This would not be of much use for a beginning student, but illustrates the power of the extensibility of Stata.

Michael mentioned the price difference and it is really dramatic. When you buy (not lease) Stata you get everything. The price is not an annual fee.

Many people still use SPSS and I hope IBM invests enough to make it a more competitive product for social science researchers. I'm concerned that their primary interest may be in the predictive analytics applications for marketing researchers, but I hope this is a mistaken concern.

--alan

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: st: Re: Your paper on Stata,SAS and SPSS

John F Hall
Alan

Thanks for this: very helpful.

Not sure about Poisson distributions (my course went 11 weeks before
touching t-test or chi-sq) but the reversing command looks neat.  I have the
exact same situation in one of my tutorials constructing simple attitude
scales (from a survey of 15- and 16- year olds) to measure "attachment to
status quo" and "sexism" from a list of items some of which need to be
reverse coded, but there's also a lengthy narrative explaining what I'm
doing and why, and also warnings of missing data (with COUNT) advice on
giving scales a true zero point (with COMPUTE) and the dangers with RECODE
if you're not careful, especially if you save the working file without
keeping a copy of the original.

[7-hour interlude here as a digger looking for a mains water leak went
through the phone cable, but at least France Telecom came the same day to
fix it.  As soon as I've filled the whole back in, I'll scout round for some
examples of Stata output]

You can see the sequence and contents of my SPSS tutorials on
http://surveyresearch.weebly.com/spsspasw-18-tutorial-guide.html : all the
main menus are displayed in the left pane on the site.

I don't have Stata installed and don't want to download a trial version
until I have time to do it justice.

John Hall
http://surveyresearch.weebly.com


----- Original Message -----
From: Alan Acock
To: [hidden email]
Cc: [hidden email] ; Bruce Weaver
Sent: Wednesday, August 11, 2010 2:41 AM
Subject: Re: st: Re: Your paper on Stata,SAS and SPSS



On Aug 10, 2010, at Tue Aug 5 12:48 , John F Hall wrote:

> Alan
>
> I only joined the list two days ago, so I haven't had a chance to find
> much Stata syntax to set alongside SPSS.  Listers have sent one or two
> one-liners, but with no accompanying output examples.
> I'm talking about reading from a raw data matrix, adding variable and
> value labels, declaring missing values, data transformations, index
> construction and the like (possibly via correlation) followed by simple
> analysis like frequency counts, barcharts and contingency tables using %%,
> not fancy multivariate inferential statistics.  Had I still been teaching,
> that would have come much later in my course, but far too late for the
> survey report that had to be on the client's desk by yesterday.
> You're welcome to download data sets and tutorials from my site and offer
> Stata examples to set alongside the SPSS syntax and output (no GUI for me:
> far too cumbersome, complex and tiresome).
> John Hall
> http://surveyresearch.weebly.com

John,

To read the following you should have a fixed font, e.g., courier, and may
have some problems if your email system raps lines around.

I sent one line commands because that is how simple the syntax is. Here is a
complete program. The dataset is installed on your PC when you install
Stata. It is called auto.dta.

Here is the entire program:
********begin*********
sysuse auto
tab foreign
fre foreign
ttest mpg, by(foreign)
tab rep78 foreign, col chi2 V
pwcorr weight trunk headroom length price, obs sig
regress price weight trunk headroom length, beta
********end***********

Let me elaborate.

The sysuse auto installs the sample datasets that come with the Stata
program.
The tab foreign does a frequency distribution--
==========
. tab foreign

  Car type |      Freq.     Percent        Cum.
------------+-----------------------------------
  Domestic |         52       70.27       70.27
   Foreign |         22       29.73      100.00
------------+-----------------------------------
     Total |         74      100.00
==========

I prefer the frequency distribution output that SPSS has. A user wrote a
command, fre, that does this. From the Stata command line you can say findit
fre and follow the link to install it (with one click). Here is what you get
with that command: As an SPSS person you probably also prefer this output
===========
. fre foreign

foreign -- Car type
----------------------------------------------------------------
                  |      Freq.    Percent      Valid       Cum.
-------------------+--------------------------------------------
Valid   0 Domestic |         52      70.27      70.27      70.27
       1 Foreign  |         22      29.73      29.73     100.00
       Total      |         74     100.00     100.00
---------------------------------------------------------------
===========

As an example of an independent t-test you may want to know if price is
significantly different depending on whether the car is domestic (U.S.) or
foreign (not U.S.). The ttest command gives you this
===========
. ttest mpg, by(foreign)

Two-sample t test with equal variances
------------------------------------------------------------------------------
  Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf.
Interval]
---------+--------------------------------------------------------------------
Domestic |      52    19.82692     .657777    4.743297    18.50638
21.14747
Foreign |      22    24.77273     1.40951    6.611187    21.84149
27.70396
---------+--------------------------------------------------------------------
combined |      74     21.2973    .6725511    5.785503     19.9569
22.63769
---------+--------------------------------------------------------------------
   diff |           -4.945804
 1.362162               -7.661225   -2.230384
------------------------------------------------------------------------------
   diff = mean(Domestic) - mean(Foreign)                         t
  -3.6308
Ho: diff = 0                                     degrees of freedom =
72

   Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
Pr(T < t) = 0.0003         Pr(|T| > |t|) = 0.0005          Pr(T > t) =
0.9997

In order to do a what SPSS calls a crosstabulation of two variables and get
a chi-square test and Cramer's V
you use the next one line command:
===========

. tab rep78 foreign, col chi2 V

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

   Repair |
   Record |       Car type
     1978 |  Domestic    Foreign |     Total
-----------+----------------------+----------
        1 |         2          0 |         2
          |      4.17       0.00 |      2.90
-----------+----------------------+----------
        2 |         8          0 |         8
          |     16.67       0.00 |     11.59
-----------+----------------------+----------
        3 |        27          3 |        30
          |     56.25      14.29 |     43.48
-----------+----------------------+----------
        4 |         9          9 |        18
          |     18.75      42.86 |     26.09
-----------+----------------------+----------
        5 |         2          9 |        11
          |      4.17      42.86 |     15.94
-----------+----------------------+----------
    Total |        48         21 |        69
          |    100.00     100.00 |    100.00

         Pearson chi2(4) =  27.2640   Pr = 0.000
              Cramér's V =   0.6286
==============

If you want a correlation matrix with the pairwise N and the level of
significance you use the next line
==============
. pwcorr weight trunk headroom length price, obs sig

            |   weight    trunk headroom   length    price
-------------+---------------------------------------------
     weight |   1.0000
            |
            |       74
            |
      trunk |   0.6722   1.0000
            |   0.0000
            |       74       74
            |
   headroom |   0.4835   0.6620   1.0000
            |   0.0000   0.0000
            |       74       74       74
            |
     length |   0.9460   0.7266   0.5163   1.0000
            |   0.0000   0.0000   0.0000
            |       74       74       74       74
            |
      price |   0.5386   0.3143   0.1145   0.4318   1.0000
            |   0.0000   0.0064   0.3313   0.0001
            |       74       74       74       74       74
==============

If you want to do a simple multiple regression and get R-square, B's,
beta's, etc.
==============
. regress price weight trunk headroom length, beta

     Source |       SS       df       MS              Number of obs =
74
-------------+------------------------------           F(  4,    69) =
10.20
      Model |   236016580     4    59004145           Prob > F      =
0.0000
   Residual |   399048816    69  5783316.17           R-squared     =
0.3716
-------------+------------------------------           Adj R-squared =
0.3352
      Total |   635065396    73  8699525.97           Root MSE      =
2404.9

------------------------------------------------------------------------------
      price |      Coef.   Std. Err.      t    P>|t|
Beta
-------------+----------------------------------------------------------------
     weight |   4.753066   1.120054     4.24   0.000
1.252435
      trunk |   114.0859   109.9488     1.04   0.303
.1654491
   headroom |  -711.5679   445.0204    -1.60
        -.2040968
     length |  -101.7092   42.12534    -2.41
        -.7678236
      _cons |   11488.47   4543.902     2.53   0.014
.
------------------------------------------------------------------------------

==============

All of these are very basic commands for a beginning course. Stata has menus
where you can point and click, but you can see why many users don't bother
with these. In my book on Stata I reproduce most of the sorts of commands
you cover in your tutorials. The fact that you make these available at no
charge for SPSS people is very nice of you.

There are some areas where SPSS has an advantage. People doing traditional
ANOVA find SPSS easier to use, for example. As far as data management goes
it is a mixed thing. I work with some complex datasets so the added power of
Stata is important for data management. Michael Mitchell has a great book on
data management (Stata Press). Stata does use the two step process of
labeling variables and some find this awkward. The advantage is that the
same value labels, once defined in step one, can be applied broadly to
appropriate variables.

The extensibility of Stata by users is remarkable. Some of what you see on
Statalist is the code they wrote and this can be complicated even though the
command is simple. For example, a user wrote a command revrs.
If I say revrs varlist (after installing the command the first time), Stata
will reverse code each of the variables and reassign the value labels for
them, then generate new variables with rev at the start while keeping the
original variables unchanged. Some of these user written commands are
extremely powerful. Scott Long, also a sociologist, wrote a one line command
that runs a Poisson regression, a negative binomial regression, a zero
inflated Poisson regression, and a zero inflated Negative Binomial
regression. The output includes the results for each of these and a table
helping you decide which model fits the data best. This would not be of much
use for a beginning student, but illustrates the power of the extensibility
of Stata.

Michael mentioned the price difference and it is really dramatic. When you
buy (not lease) Stata you get everything. The price is not an annual fee.

Many people still use SPSS and I hope IBM invests enough to make it a more
competitive product for social science researchers. I'm concerned that their
primary interest may be in the predictive analytics applications for
marketing researchers, but I hope this is a mistaken concern.

--alan
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: st: Re: Your paper on Stata,SAS and SPSS

John F Hall
In reply to this post by Alan Acock
Richard

Jacqueline Collier's new book is very thorough on this: hot on keeping
journal files with all the *.sps files generated via PASTE (explains how to
change SPSS settings) and aims to wean users away from menus towards syntax.

Jacqueline Collier, Using SPSS Syntax: A Beginner's Guide (Sage 2010)

http://books.google.fr/books?id=8xXy1XZrTxYC&printsec=frontcover&dq=Jacqueline+Collier+Using+SPSS+Syntax:+A+Beginner's+Guide&source=bl&ots=JdCEgjYnK-&sig=lZgkFZ4-XqbhkwkS1_boDY1a3W8&hl=fr&ei=mIItTOTAOoGJOJLk1fMB&sa=X&oi=book_result&ct=result&resnum=1&ved=0CBUQ6AEwAA#v=onepage&q&f=false
As far as I recall, it's the only textbook to deal with dates (out of eleven
on my list) .

http://surveyresearch.weebly.com/spss-textbooks.html

John Hall
[hidden email]
http://surveyresearch.weebly.com


PS  I've stripped out people on your "Reply all" who were more interested in
quants and computing in in Sociology than in the finer points of SPSS, but
added the SPSSx-Listserver as there was a debate last year on the relative
merits of syntax and GUI and recently another on universities switching to
Stata because of IBM/SPSS pricing policy.

----- Original Message -----
From: Richard Ristow
To: John F Hall ; Ronan Conroy
Sent: Friday, August 13, 2010 6:39 PM
Subject: Re: st: Re: Your paper on Stata,SAS and SPSS


At 10:44 AM 8/13/2010, John F Hall quoted Ronan Conroy (I think):


"The trouble is that, in my experience, people teaching SPSS are really
reluctant to use syntax, and teach students a superstitious reliance on
menus."

Aaaaaaaugh. For whatever reason, SPSS got something right that's very rare:
have the GUI work by generating and executing syntax, which is also saved.

That can be a great way to learn syntax, if you choose to use it that way.
It can be a convenience, even if you know syntax. (I sometimes use it that
way.)

And even if you never learn syntax, if you run a journal, there's a record
of what you did that SOMEBODY can read.

How do users of menu-only stat systems document what manipulations they've
done? How do they remember, themselves?

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD