Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Problem viewing log files (.smcl) created from do-files (dissimilarity matrices) in Stata 12.1


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Problem viewing log files (.smcl) created from do-files (dissimilarity matrices) in Stata 12.1
Date   Mon, 18 Mar 2013 19:50:25 +0000

Your results are not included in your log file.  Clearly we can't test
your code without your files.

But this should work under any current version of Stata provided you
have write permission

log using mar18.smcl, replace
matrix J = J(6,7,42)
mat li J
log close
type mar18.smcl
view mar18.smcl

and it works from a do-file when you execute  in 12.1 under MS Windows.

But it yields a blank file when you -run- the file. I suspect the
difference between -do- and -run- is biting you here. -run- is
essentially silent.

Nick

On Mon, Mar 18, 2013 at 9:38 AM, Aoife <[email protected]> wrote:

> I'm having a problem viewing log files (.smcl) created from do-files in
> Stata 12.1  (Mac version). I have previously been able to view log files
> and can still view older files I have created, but for some reason my
> newly created files, using mainly dissimilarity matrices commands, appear
> blank in Stata's viewer. When I open the file in a text programme, this is
> all that appears:
>
> {smcl}
> {com}{sf}{ul off}{smcl}
> {com}{sf}{ul off}
>
> A sample of the code in the corresponding do-file is as follows:
>
> version 12.1
> clear
> set more off
> capture log close
> log using "/Users/aoife/Paper 2/Cluster analysis/cluster_an2", replace
> use "/Users/aoife/Paper 2/Cluster analysis/2003CDPresp_cap_an.dta"
>
> //Step 1: Dissimilarity matrices
> //Financial sector
> //Dissimilarity matrix using squared Euclidean distance - lower values are
> more similar, higher values more dissimilar
> matrix dissimilarity matfin2003 = pos neg posneg_bal if year==2003 &
> financial==1, Lpower(2) dissim(standard)
> matrix dissimilarity matfin2006 = pos neg posneg_bal if year==2006 &
> financial==1, Lpower(2) dissim(standard)
> matrix dissimilarity matfin2009 = pos neg posneg_bal if year==2009 &
> financial==1, Lpower(2) dissim(standard)
> mat list matfin2003
> mat list matfin2006
> mat list matfin2009
> //Telecomms
> matrix dissimilarity matcomms2003 = pos neg posneg_bal if year==2003 &
> comms==1, Lpower(2) dissim(standard)
> matrix dissimilarity matcomms2006 = pos neg posneg_bal if year==2006 &
> comms==1, Lpower(2) dissim(standard)
> matrix dissimilarity matcomms2009 = pos neg posneg_bal if year==2009 &
> comms==1, Lpower(2) dissim(standard)
> mat list matcomms2003
> mat list matcomms2006
> mat list matcomms2009
>
> log close
>
>
>
> I have run the same commands without using a do-file but with a log open
> and I can view the file that is created without any problems. So I'm
> completely puzzled as to why this is happening. I have also tried the
> translate command but still the corresponding .log files are blank.
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index