Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: 3 very basic questions


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: 3 very basic questions
Date   Tue, 14 Jun 2005 12:32:42 -0500

At 01:12 PM 6/14/2005 -0400, stats dummy wrote:
I'm a recent convert from SPSS (hence "statsdummy"). I'm having
trouble making the adjustment. Here are three things I'd like to do,
but am having difficulty doing (even after scouring the documentation
& on-line discussions):
Speaking as another SPSS refugee, you may find my "Stata Highlights" page helpful:

http://www.nd.edu/~rwilliam/stats1/StataHighlights.html

If you hunt around the linked pages, you'll generally find that SPSS equivalents are lurking in there too, as Stata is a relative newcomer to the classes I have been teaching since the 1980s.


1. Normalize my data. I'd like to set the mean to zero and the SD to 1
for most of my variables. Is there a simple way to do this?
There are a couple of routines you can download for this, e.g. -zscore- and -center-. Use the -findit- command to locate them. There is also the -std- function of -egen-, e.g.

egen z = std(x)


2. Develop a regression model in a series of steps, noting the change
in R2 that the addition of each new set of IVs produces and whether
that change is significant (especially useful in assessing the
significance of interactions). For other refugees from SPSS, this
would be akin to:
Download the -hireg- routine. You probably want to be sure to use the option for listwise deletion.


3. Perform the same transformation on a series of variables without
repeating the command. For other refugees from SPSS, this would be
akin to:

RECODE v1 v2 v3 INTO v11 v22 v33 .
See the help for recode, e.g.

recode x1 x2 (1 2 3/5=1) (6/10=2), gen(nx1 nx2)

-clonevar- is also a very nice command, and I'm not aware of an exact SPSS equivalent.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index