Showing posts with label SPSS. Show all posts
Showing posts with label SPSS. Show all posts

Monday, May 6, 2013

Convert stata to spss


Abstract

This package provides a batch process to exchange data of current directory between different spreadsheet and statistics programs. Stat/Transfer is required.

Download Info

If you experience problems downloading a file, check if you have the proper application to view it first. In case of further problems read the IDEAS help page. Note that these files are not on the IDEAS site. Please be patient as the files may be large.
File URL: http://fmwww.bc.edu/repec/bocode/f/ftrans.ado
File Function: program code
Download Restriction: no

File URL: http://fmwww.bc.edu/repec/bocode/f/ftrans.sthlp
File Function: help file
Download Restriction: no


Source

Thursday, November 3, 2011

Can I install and use SPSS Data Entry for Windows with a Windows Vista or Win 7 operating system?


Source
Problem(Abstract)

I recently purchased SPSS Data Entry for Windows 4.0.x. When I try to install it on my Windows Vista machine, I receive errors concerning licensing and the product does not launch. How can I install SPSS Data Entry for Windows on a Windows Vista machine?
Resolving the problem


SPSS has developed a method for installing Data Entry for Windows which will allow the program to function on Windows Vista. Please note that
SPSS Data Entry for Windows is not officially tested or supported on this platform.

1. Insert the Data Entry for Windows CD-ROM and browse the CD-ROM through Windows Explorer.

2. Locate the file, setup.exe and right click on it. Choose the resulting option of Run as Administrator.
a. The setup.exe file is located in the 'dew' folder on the root of the Installation CD.
Only for Windows Vista Users, do the remaining 3 bullet points:
* Right click on setup.exe or setup and choose "Run as administrator".
* You will get the memory error but just click "OK" and proceed with the installation.
* Follow the directions on each screen.

3. Follow the prompts during the installation process. After entering your license code, you will get a warning

"The license file could not be installed on your machine"

If you have chosen to install both Data Entry Builder and Data Entry Station, you will be prompted to enter license codes for each of the products, followed by this warning for each. Ignore this warning and continue.

4. Click the Finish button when the installation has completed.

5. Using Windows Explorer, browse to the Data Entry for Windows folder installed on the hard drive. The default directory is C:\Program Files\Data Entry for Windows.

6. Locate the file, licrenew.exe, and right click on it and choose Properties.

7. In the Properties dialog box, select the Compatibility tab. Click on the check box in the Privilege Level section to enable Run this program as an administrator. Click OK to finish.

8. Using Windows Explorer, double click on the licrenew.exe file. A DOS window will appear asking for a license to be entered. Enter your license code for SPSS Data Entry for Windows and press Enter. If you have two codes, enter them one at a time.

9. In order to launch the program successfully, click on the Start button located in the windows toolbar and navigate through the menu items to find SPSS Data Entry for Windows. Click on it to expand, showing the shortcuts for SPSS Data Entry Builder and SPSS Data Entry Station. You will only see SPSS Data Entry Station if you have purchased this product. Select SPSS Data Entry Builder and right click on the mouse. Select Properties in the context menu.

10. Click the Compatibility tab in the resulting dialog box and in the Privilege Level, select the check box to enable Run this program as an administrator and click OK.

11. Repeat these steps for the SPSS Data Entry Station shortcut menu item if you have purchased this product.

12. Launch the product using the shortcuts just modified. You will see a User Account Control alert:

An unidentified program wants access to your computer.

If the name of the program is builder.exe or station.exe, choose to Allow its execution.

Now both programs should function correctly in Windows Vista

Thursday, September 29, 2011

How do i do this SPSS command in Stata

http://www.ats.ucla.edu/stat/stata/faq/spss_command_to_stata.htm

Say that you use SPSS but wish to know how to do a particular command in Stata. For example, you want to make a new variable and know you can use the compute command to create a new variable in SPSS, but what is the equivalent (or similar) command in Stata?  (By the way, there are actually three similar Stata commands, generate, replace and egen). The table below shows you five columns of information.
  • SPSS commands, listed in alphabetical order
  • The equivalent (or similar) Stata command(s)
  • Links to UCLA web pages that illustrate the use of the Stata command
  • Cross references to the Stata manual for learning more about the command (which is also hot linked to the online help for the command)
  • Cross references to books that illustrate more about the command.
This table is by no means complete, and it not intended to be a complete and exhaustive reference. Instead, it is intended to be a short, simple, sweet and handy reference for SPSS users who are making the transition to Stata. We also highly recommend A Sample Stata Session (via the Stata web site) which gives you a quick overview of using Stata as well as seeing the [GS] Getting Started manual that accompanied your purchase of Stata.
SPSS CommandStata Command(s)UCLA Web PagesStata ManualBooks
ADD FILESappendCombining data  [D] appendishr - 9.5
AGGREGATEcollapseCollapsing data across observations[D] collapseishr - 9.6
ANOVAanova.[R] anova 
AUTORECODEdestring
encode
How can I quickly convert many string variables to numeric  [D] destring
[D] encode
 
CASESTOVARSreshape wideReshaping data from long to wide[D] reshape 
COMMENT*
/* */
//
.[P] commentsishr 4.8
COMPUTEgenerate
replace
egen
Creating and Recoding Variables[D] generate
[D] replace
[D] egen
ishr 8.1
CORRELATIONScorrelate
pwcorr
- Overview of statistical tests in Stata
- Annotated output for the correlation command
[R] correlate 
CROSSTABStabulate
tab2
Overview of statistical tests in Stata[R] tabuluate twowayishr 10.3
DATA LISTinfile
infix
insheet
Inputting raw data files into Stata[D] infile (free format)
[D] insheet
[D] infix (fixed format)
ishr 6.3
DELETE VARIABLESkeep
drop
Subsetting variables and observations[D] drop 
DESCRIPTIVESsummarize- Descriptive information and statistics
- Annotated output for the summarize command
 
[R] summarizeishr 10.1
DISPLAYdescribe.[D] describe 
DOCUMENTnotes.[D] notes 
DO IFxyzcommand ifStata Learning Module: Using "if" for subsetting with Stata Commands[U] 11.1.3 if exp 
DO REPEATforeachWorking across variables using foreach[P] foreachishr - 17.4
ECHOdisplay.[P] display 
ERASEerase.[D] erase 
EXAMINEtabulate x, summarize(y)Overview of statistical tests in Stata[R] tabulate, summarize() 
EXECUTEno equivalentcomment: transformation commands always immediately executednone 
EXPORTno equivalentcomment: all Stata files can be used on all platformsnone 
FACTORfactorAnnotated output for the factor command[MV] factor 
FILE LABELlabel dataLabeling data, variables and values[D] label 
FILTERxyzcommand if (___)Using "if" for subsetting with Stata Commands[U] 11.1.3 if exp 
FLIPxpose.[D] xpose 
FORMATSformat.[D] formatishr - 5.2
FREQUENCIEStabulateOverview of statistical tests in Stata[R] tabulate onewayishr - 10.3
GET FILEuseUsing and saving Stata data files[D] useishr - 6.1
GET SASfdause- SAS to Stata
- SAS w/formats to Stata
[D] fdause 
GRAPHgraphIntroduction to graphics[G] graph 
IFgenerate __ if __Using "if" for subsetting with Stata Commands[U] 11.1.3 if expishr - 8.1
IGRAPHgraphIntroduction to graphics[G] graph 
INCLUDE FILEdo ___.[R] do 
LISTlist.[D] list 
LOGISTIC REGRESSIONlogisticData Analysis Example: Logistic Regression[R] logistic 
LOOPforvalues [P] forvalues 
MATCH FILESmergeCombining Stata data files[D] mergeishr - 9.5
MEANStabulate __, summarize(__)Overview of statistical tests in Stata[R] tabulate, summarize()ishr - 10.4
MISSING VALUESnone.[U] 12.2.1 Missing Values 
MIXEDxtmixed.[XT] xtmixed 
NOMREGmlogitData Analysis Example: Multinomial Logistic Regression[R] mlogit 
PLUMologitData Analysis Example: Ordinal Logistic Regression[R] ologit 
PROBITprobitData Analysis Example: Probit Regression[R] probit 
RECODErecodeCreating and Recoding Variables[D] recodeishr - 8.4
RECORD TYPEno equivalenthttp://www.stata.com/support/faqs/data/hier.html  
REGRESSIONregress- Regression with Stata
- Annotated output for the regress command
[R] regress 
RELIABILITYalpha.[R] alpha 
RENAME VARIABLESrename.[D] rename 
SAMPLEsample.[D] sampleishr - 9.2
SAVEsaveUsing and saving Stata data files[D] saveishr - 6.1
SELECT IFkeep if
drop if
Subsetting variables and observations[D] dropishr - 9.2
SORT CASESsort.[D] sortishr - 9.4
SPLIT FILEby.[D] by
[U] 11 Language syntax
ishr - 4.7
SUMMARIZEtabulate ___, summarize(___)Overview of statistical tests in Stata[R] tabulate, summarize() 
TEMPORARY.
SELECT IF (___).
xyzcommand if (___)Using "if" for subsetting with Stata Commands[U] 11.1.3 if expishr - 4.4
T-TESTttestOverview of statistical tests in Stata ishr - 10.4
VALUE LABELSlabel valuesLabeling data, variables and values
[D] label
ishr - 7.1
VARIABLE LABELSlabel variableLabeling data, variables and values[D] labelishr - 7.1
VARSTOCASESreshape longReshaping data from wide to long[D] reshape 
WEIGHTaw pw fw iwWhat types of weights do SAS, Stata and SPSS support?[U] l11.1.6 weightishr - 4.5
Legend
  • xyzcommand stands for any arbitrary Stata command
  • UCLA Web Pages
    • "." - no specific page exists. Try visiting the site and using the "search" command to pages that might tangentially refer to the command.
  • Stata Manual Names
    • [D] Data
    • [R] Reference manual
    • [U] Users Guide
    • [MV] Multivariate Statistics
    • [XT] Cross sectional time series
  • Book References
    • ishr - Introduction to Stata for Health Researchers by Svend Juul

Thursday, August 5, 2010

Convert VHLSS Stata- SPSS


Do SPSS đọc được rất nhiều loại đuôi kể cả đuôi .dta của stata, nhưng nhiều khi để đuôi .dta của stata dùng trong SPSS lại không tiện, như khi bạn muốn merge các file dữ liệu trong SPSS đuôi file dữ liệu phải là .sav
Việc dùng Stat/tranfer chỉ chuyển được 1 cách thủ công các file, mất thời gian, khi dùng SPSS lại phải mất công.
Trong SPSS có cửa sổ Syntax rất tiện lợi để viết các code làm nhanh gọn
Mình làm 1 số file syntax trên SPSS19 để convert các file VHLSS
VHLSS2004
VHLSS2006
VHLSS2008

Với các file này nếu muốn sử dụng trên máy tính khác chỉ việc vào cửa số Syntax SPSS
chon Edit/ Replace (Ctrl+H)
Ví dụ


Công việc trở lên đơn giản, với nhiều loại dữ liệu khác cũng có thể làm tương tự như vậy