Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"John F Hall" <johnfhall@orange.fr> |

To |
"Statalist" <statalist@hsphsun2.harvard.edu> |

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

Date |
Wed, 11 Aug 2010 15:55:31 +0200 |

Alan Thanks for this: very helpful.

John Hall http://surveyresearch.weebly.com

To: statalist@hsphsun2.harvard.edu Cc: spssx-l@listserv.uga.edu ; 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:

AlanI only joined the list two days ago, so I haven't had a chance to findmuch Stata syntax to set alongside SPSS. Listers have sent one or twoone-liners, but with no accompanying output examples.I'm talking about reading from a raw data matrix, adding variable andvalue labels, declaring missing values, data transformations, indexconstruction and the like (possibly via correlation) followed by simpleanalysis 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 thesurvey 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 offerStata 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,

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 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 ==========

=========== . 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 --------------------------------------------------------------- ===========

=========== . ttest mpg, by(foreign) Two-sample t test with equal variances ------------------------------------------------------------------------------

---------+--------------------------------------------------------------------

---------+--------------------------------------------------------------------

---------+--------------------------------------------------------------------

------------------------------------------------------------------------------

Ha: diff < 0 Ha: diff != 0 Ha: diff > 0

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 ==============

============== . 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 ==============

============== . regress price weight trunk headroom length, beta

------------------------------------------------------------------------------

-------------+----------------------------------------------------------------

------------------------------------------------------------------------------ ==============

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

* * 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/

**Follow-Ups**:**AW: st: Re: Your paper on Stata,SAS and SPSS***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**References**:**st: Re: Your paper on Stata,SAS and SPSS***From:*"John F Hall" <johnfhall@orange.fr>

**Re: st: Re: Your paper on Stata,SAS and SPSS***From:*Alan Acock <acock@mac.com>

**Re: st: Re: Your paper on Stata,SAS and SPSS***From:*"John F Hall" <johnfhall@orange.fr>

**Re: st: Re: Your paper on Stata,SAS and SPSS***From:*Alan Acock <acock@mac.com>

- Prev by Date:
**st: control hight of superscript** - Next by Date:
**AW: st: Re: Your paper on Stata,SAS and SPSS** - Previous by thread:
**Re: st: Re: Your paper on Stata,SAS and SPSS** - Next by thread:
**AW: st: Re: Your paper on Stata,SAS and SPSS** - Index(es):