Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Postfile command gives error/notification ''File not found''

    Dear all,

    I ran the following code in Stata:
    Code:
    clear all
    set seed 312312
    set obs 100
    gen t = _n
    tsset t
    gen ipaustraliansmallcompanies = runiform()
    gen zurichinvausvalueretailshrfd = runiform()
    gen RM_RF = runiform()
    gen SMB = runiform()
    gen HML = runiform()
    gen MOM = runiform()
    
    **Running the model and saving results:
    **The model was also run using Newey-West adjusted standard errors for the t-statistics
    tempfile abc
    tempname def
    postfile `def' str32 fund alpha_b alpha_se mkt_b mkt_se smb_b smb_se hml_b hml_se mom_b mom_se ///
        rsquared adjrsquared sic obs normal_p heterosked_p bg1_p bg6_p bg12_p using "`abc'", replace
    However, Stata notes the following:
    Code:
    (note: file C:\Users\Rens\AppData\Local\Temp\ST_32f4_000001.tmp not found)
    Can someone please explain if this Stata notification is a problem and what it means?

    Moreover, can someone please explain what we exactly do with the postfile command?


    Code:
    help post
    says ''Declare variable names and filename of data set where results will be saved''. Does this mean that the file is saved on my PC, or are we doing something else?

    Best regards,
    Rens Eggink

  • #2
    Your code as is does run without errors on my Linux machine (Stata 16.1). Maybe remove the double quotes from abc to `abc'? I think this is not an error message, simply a warning so the user knows that a new file will be generated. Did you run the complete code there postfile is actually used later on? Does this work? For examples see https://www.stata.com/support/faqs/p.../post-command/ or https://jearl.faculty.arizona.edu/si...20Year%202.pdf
    Best wishes

    Stata 18.0 MP | ORCID | Google Scholar

    Comment

    Working...
    X