You are on page 1of 6

___ ____ ____ ____ ____ (R)

/__ / ____/ / ____/


___/ / /___/ / /___/ 12.0 Copyright 1985-2011 StataCorp LP
Statistics/Data Analysis
StataCorp
4905 Lakeway Drive
Special Edition
College Station, Texas 77845 USA
800-STATA-PC
http://www.stata.com
979-696-4600
stata@stata.com
979-696-4601 (fax)
122-user Stata network perpetual license:
Serial number: 40120535734
Licensed to: Australian School of Business
University of New South Wales
Notes:
1. (/v# option or -set maxvar-) 5000 maximum variables
running \\ad.unsw.edu.au\data\ASB\Applications\StataSE12\profile.do ...
. use "\\INFPWFS106.ad.unsw.edu.au\Student001$\z3288271\ie\DATA\meap01.dta", cle
> ar
. do "\\INFPWFS106.ad.unsw.edu.au\Student001$\z3288271\C1.3.do"
. #delimit; //Commands must be separated by semicolon
delimiter now ;
. clear;
. capture clear matrix;
. capture log close;
. set memory 64m;
set memory ignored.
Memory no longer needs to be set in modern Statas; memory adjustments are
performed on the fly automatically.
. cd H:\ie;
H:\ie
. log using myLog.log, replace;
(note: file H:\ie\myLog.log not found)
--------------------------------------------------------------------------------

name: <unnamed>
log: H:\ie\myLog.log
log type: text
opened on: 7 Mar 2012, 14:53:06
. //Read in data
> infile
> dcode bcode math4 read4 lunch enroll expend exppp lenroll lexpend lexppp
> using MEAP01.RAW;
(1823 observations read)
. //Describe variables in the file
> describe;
Contains data
obs:
1,823
vars:
11
size:
80,212
-------------------------------------------------------------------------------storage display value
variable name type format label variable label
-------------------------------------------------------------------------------dcode
float %9.0g
bcode
float %9.0g
math4
float %9.0g
read4
float %9.0g
lunch
float %9.0g
enroll
float %9.0g
expend
float %9.0g
exppp
float %9.0g
lenroll
float %9.0g
lexpend
float %9.0g
lexppp
float %9.0g
-------------------------------------------------------------------------------Sorted by:
Note: dataset has changed since last saved
. //Summary stats of math4
> summarize math4;
Variable |
Obs
Mean Std. Dev.
Min
Max
-------------+-------------------------------------------------------math4 | 1823 71.909 19.95409
0
100
. //Frequency of school scoring 100 (perfect score)

> count if math4==100;


38
. //frequency of school scoring 50 only
> count if math4==50;
17
. //correlation between math4 and read4
> correlate math4 read4;
(obs=1823)
| math4 read4
-------------+-----------------math4 | 1.0000
read4 | 0.8427 1.0000

. //summary stats of expenditure per pupil


> summarize exppp;
Variable |
Obs
Mean Std. Dev.
Min
Max
-------------+-------------------------------------------------------exppp | 1823 5194.865 1091.89 1206.882 11957.64
. //Close log file
> log close;
name: <unnamed>
log: H:\ie\myLog.log
log type: text
closed on: 7 Mar 2012, 14:53:06
-------------------------------------------------------------------------------. //Exit execution
> exit;
end of do-file

. do "\\INFPWFS106.ad.unsw.edu.au\Student001$\z3288271\C1.3.do"
. #delimit; //Commands must be separated by semicolon
delimiter now ;
. clear;
. capture clear matrix;

. capture log close;


. set memory 64m;
set memory ignored.
Memory no longer needs to be set in modern Statas; memory adjustments are
performed on the fly automatically.
. cd H:\ie;
H:\ie
. log using myLog.log, replace;
-------------------------------------------------------------------------------name: <unnamed>
log: H:\ie\myLog.log
log type: text
opened on: 7 Mar 2012, 14:53:07
. //Read in data
> infile
> dcode bcode math4 read4 lunch enroll expend exppp lenroll lexpend lexppp
> using MEAP01.RAW;
(1823 observations read)
. //Describe variables in the file
> describe;
Contains data
obs:
1,823
vars:
11
size:
80,212
-------------------------------------------------------------------------------storage display value
variable name type format label variable label
-------------------------------------------------------------------------------dcode
float %9.0g
bcode
float %9.0g
math4
float %9.0g
read4
float %9.0g
lunch
float %9.0g
enroll
float %9.0g
expend
float %9.0g
exppp
float %9.0g
lenroll
float %9.0g
lexpend
float %9.0g

lexppp
float %9.0g
-------------------------------------------------------------------------------Sorted by:
Note: dataset has changed since last saved
. //Summary stats of math4
> summarize math4;
Variable |
Obs
Mean Std. Dev.
Min
Max
-------------+-------------------------------------------------------math4 | 1823 71.909 19.95409
0
100
. //Frequency of school scoring 100 (perfect score)
> count if math4==100;
38
. //frequency of school scoring 50 only
> count if math4==50;
17
. //correlation between math4 and read4
> correlate math4 read4;
(obs=1823)
| math4 read4
-------------+-----------------math4 | 1.0000
read4 | 0.8427 1.0000

. //summary stats of expenditure per pupil


> summarize exppp;
Variable |
Obs
Mean Std. Dev.
Min
Max
-------------+-------------------------------------------------------exppp | 1823 5194.865 1091.89 1206.882 11957.64
. //Close log file
> log close;
name: <unnamed>
log: H:\ie\myLog.log
log type: text
closed on: 7 Mar 2012, 14:53:07
--------------------------------------------------------------------------------

. //Exit execution
> exit;
end of do-file

You might also like