









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










1. Introduction to LOG FILES2. Introduction to LOG FILES
To open a log file click on the icon
A more detailed view is shown
You can also select it via ‘File’ menu.
A dialogue box appears which asks us that where to savethis log file, write the name of the log file and also mentionthe destiny folder to save the file there.
Click
save
to
save the file.
Now look at the log file which shows the details of the work youdid so far. For this click on the log file icon. A
dialogue
box
will
appear named “Stata LogOptions”
and
select
“view
snapshot
of
log
file” and click OK.
When you click OK, the resulting window will appear whichshould look like the one shown below: To close the log file select“close log file” and clickOK.
10
Now start working. We run one command and we want to see the results of our work inthe log file with the previous version of log file.
11
If you want to pause thelog file. i.e; you wantsome commands not tobe recorded in the logfile,
select
option
“Suspend log file”.
The Result Window gives the message that you paused the log file.
13
Cmdlog only keeps the record of the work which we do instata and does not keep record of Stata’s output. So it is asubset of the Log file.You
can
make
full
logs,
command
logs,
or
both
simultaneously.
Neither is produced until you tell Stata to
start logging.Command logs are always ASCII text files, making themeasy to convert into do-files.
14
To open cmdlog, Type in command window the following command: cmdlog using “test.txt” OR you can specify the full path that where to save the file and press enter.We want to save the file in the folder located in Desktop so we enter thecomplete path as shown below:
The Results window confirms that the cmdlog file is opened.
16
Now we run some commands and see the cmd log file.We run two commands,
display abs(-4) and log(10).
Now see that the size of the file changes from 0 KB to 1KB.So this means that some data has been added to this file.
17
Now
open
this
“command
log.txt”
file.
It
shows
that
two
commands which we run. For more details on using log and cmdlog file, see Stata builtin help.
OR use the shortcut icon