[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: A Problem on Append Command

From   "Asgar Khademvatani" <>
Subject   st: A Problem on Append Command
Date   Fri, 16 Nov 2007 20:16:10 -0700 (MST)

Dear All,

 Actually, the first I am running a SUR model using time- series dataset
from 1958-2000 as follows in the following , then I am trying to append
some extra observation from 2001-2050 to my master data set in Stata
memory by append command as it is in the following .do file.

version 8.2
set more off
capture log close
log using c:\data\outofsample_scg.log, replace

*loading data set

insheet using c:\data\US_SCG.txt

  rename v1 yr

 * generating  restricted variable costs =labor plus materials costs
   gen vc_sg = vl_sg+vm_sg

 *generating labor and materials shares variables
  gen sl_sg = vl_sg/vc_sg
  gen sm_sg = vm_sg/vc_sg

 *time variable identification
  tsset yr

*generating ln of variables in cost model

gen lvc_sg = ln(vc_sg)

gen lq_sg = ln(q_sg)

gen lpl_sg = ln(pl_sg)

gen lpm_sg = ln(pm_sg)

gen lk_sg = ln(k_sg)

gen le_sg = ln(e_sg)

gen lvcq_sg = ln(vc_sg)-ln(q_sg)

gen lple_sg = lpl_sg * le_sg

gen lplk_sg = lpl_sg * lk_sg

gen lpme_sg = lpm_sg * le_sg

gen lpmk_sg = lpm_sg * lk_sg

gen lek_sg  = le_sg * lk_sg

gen lek_neg_sg  = (-1)*le_sg*lk_sg

gen lplt_sg = lpl_sg * t

gen lpmt_sg = lpm_sg * t

gen let_sg = le_sg * t

gen lkt_sg = lk_sg * t

cons drop _all
constraint define 1 [sl_sg]_cons = [lvc_sg]lpl_sg
constraint define 2 [sl_sg]le_sg = [lvc_sg]lple_sg
constraint define 3 [sl_sg]lk_sg = [lvc_sg]lplk_sg
constraint define 4 [sl_sg]t = [lvc_sg]lplt_sg
constraint define 5 lpl_sg + lpm_sg = 1
constraint define 6 lple_sg + lpme_sg = 0
constraint define 7 lplk_sg + lpmk_sg = 0
constraint define 8 lplt_sg + lpmt_sg = 0
constraint define 9 lq_sg = 1

sureg (lvc_sg lq_sg lpl_sg lpm_sg le_sg lk_sg lple_sg lplk_sg lpme_sg
lpmk_sg lek_neg_sg lplt_sg lpmt_sg let_sg lkt_sg t) (sl_sg le_sg lk_sg t),
isure corr constraints(1,2,3,4,5,6,7,8,9)

append using "c:\data\US_outofsample_SCG.txt"

But, the problem is that when I running my .do file on Stata 9.2, or 8.2
the erroe message is given as follows in the following:

.....Stata has encountered the problem fo error and needs to closed. Wew
are sorry for any inconvenience......

This error message and problem happens when Stata tries to run "Append"

When I am trying to report this problem by clicking on "send error" or
"don`t send error" button, everything is closed including Stata and my .do

Could anybody please help me out on this matter?

Thank you

Asgar Khademvatani
University of Calgary,
2500 University Dr., NW., Calgary,
Alberta, Canada, T2N 1N4
Tel: +1(403)210-2574

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index