/* Residential retail do-file version 2.0 Version log Version 1.0: First version of the PR24 residential retail do-file Version 2.0: Added Pooling and LM tests; re-ordered statistical tests in line with template order; and added calculation of efficiency scores for each regression. In this do file we prepare the residential retail dataset and replicate the PR19 Final Determination models (with additional years of outturn data). The following code can be used to test other residential retail econometric specifications as part of the PR24 modelling consultation phase. Note this dataset does not exactly replicate the PR19 Final Determination econometric results, due to changes in the underlying data (eg the use of updated mapping of Local Authorities to company boundaries to map our external drivers, the smoothing of depreciation over a larger sample period) and changes in the panel of companies used (we use SVE and HDD in 2018-19 rather than SVT and DVW, and SWB between 2013-14 to 2015-16 rather than SWT and BWH). */ *This do file has the following stages: *1.- DATA PREPARATION *1a. - Pre-preparations to alter setting and clear any data from storage *1b. - Import master dataset from Excel *1c. - Assign labels, rename and destring variables *1d. - Replace missing values *2. - VARIABLES GENERATION *2a. - Independent variables (cost drivers) *2b. - Dependent variables (costs) at total level *2c. - Unit conversion of variables *2d. - Generate unit cost dependent variables *2e. - Transform variables to real terms *2f. - Transform variables to logs *2g. - Export variables to Excel for QA purposes *2h. - Export matrix of correlation coefficients to Excel *3. - STRUCTURE THE DATASET IN PANEL FORMAT *3a. - Set up panel dataset *3b. - Generate time dummies, time trend and set time period *3c. - Remove unnecessary companies *4. - SET UP MACROS FOR REGRESSIONS *4a. - Bad debt related costs *4b. - Other costs *4c. - Total costs *4d. - Replicate specifications using smoothed doubtful debt data *5. - RUN REGRESSIONS AND STATISTICAL TESTS *5a. - Pooled OLS (pooled OLS regressions have been added for reference) *5b. - Random effects *6. - CALCULATE EFFICIENCY SCORES *6a. - Calculate actual costs *6b. - Calculate predicted costs *6c. - Calculate efficiency scores and ranking *7. - EXPORT RESULTS *7a. - Save all results in matrices *7b. - Export results *7c. - Export time and date of run ************************************************************************************************************ * 1. DATA PREPARATION ************************************************************************************************************ *1a. - Pre-preparations clear set more off set matsize 800 matrix drop _all estimates drop _all set type double, perm /*Set so that all new variables that are created must be in double format (definition: this data storage option has about 16 digits of accuracy with a trade off of a larger do-file size) rather than float format (definition: this default data storage option has only 7 digits of accuracy) in order to ensure accuracy to the last decimal point (especially important when doing the transformations from £ millions to £s) */ *1b. - Import the master dataset from Excel *Choose the location to source data from and save regression outputs to cd "O:\OFWSHARE\Cost assessment\PR24\PR24 datasets\2022 11 Nov22" *Import master dataset import excel ".\FM_RR1 v3.0.xlsx", sheet("nom statafile") firstrow *1c. - Assign labels, rename and destring variables *Assign labels using the item description in the first row foreach var of varlist * { label variable `var' "`=`var'[1]'" } *Drop the first three rows not containing data drop in 1/3 *Add names to columns that are not named rename A codecombine rename B companycode rename Boncode financialyear *Rename CPIH variable rename C_CD0014R_PR19 cpih /*Destring all variables. We generate two variables, "start" and "end" to ensures codecombine, companycode and financialyear are not destringed */ g start="" g end="" order codecombine companycode financialyear start destring start-end, replace drop start end *1d. - Replace missing values *Replace missing values in the smoothed doubtful debt variable with the original doubtful debt data g sdebt = BM9003S replace sdebt = BM9003 if sdebt == . *Replace remaining missing values in the dataset foreach x of varlist BM9019 BM9020 BM4017 BM9003S R3019 R3021 R3020 R3022 { replace `x' = 0 if `x' == . } ************************************************************************************************************ * 2. VARIABLES GENERATION ************************************************************************************************************ /*For QA purposes, we drop the cost and cost drivers calculated in Excel and recalculate them in Stata.*/ drop hh_t hhm_hh hhdu_hh /// rev_hh /// TC_tr DC_t OC_tr /// sTC_tr sOC_tr /// TCsdebt_tr DCsdebt_t OCsdebt_tr /// sTCsdebt_tr sOCsdebt_tr /// s_depreciation *2a. - Calculate the independent variables (cost drivers) *Total households connected g hh_t = R3017 + R3019 + R3021 + R3018 + R3020 + R3022 label variable hh_t "Total households connected" *Proportion of metered households g hhm_hh = (R3018 + R3020 + R3022) / hh_t * 100 label variable hhm_hh "% metered connections" *Proportion of dual households g hhdu_hh = (R3021 + R3022) / hh_t * 100 label variable hhdu_hh "% dual service connections" *Average bill size g rev_hh = rev_t * 1000 / hh_t label variable rev_hh "Average bill size" /*The independent variables available in this dataset (but not all used in the PR19 models) are: *hhdu_hh: % of dual service customers *hhm_hh: % of metered customers *hh_t: number of connected households *rev_hh: average bill size £/hh *eq_lpcf62: % of households with default *eq_rgc102: credit risk score derived from all Insight data (Score Range is 000-200) *eq_xpcf2: average number of Partial Insight accounts or county court judgements per household *incomescore_unadjusted: % income deprivation (2015 and 2019 data release) *incomescore_interpolated: % income deprivation (2015 and 2019 values are extrapoled to fill in the missing years 2016-2018) *totalmigration: % total internal and international migration *counciltax: council tax collection rate */ *2b. - Calculate the dependent variables (costs) at total level /* We model at 3 levels of aggregation: i) Bad debt related costs per customer = (doubtful debt + debt management costs) / total households ii) Total costs per customer = (customer services + debt management + doubtful debt + meter reading + other operating expenditure + depreciation smoothed over 5 years + recharges costs net of recharges income + (local authority rates + exceptional items when reported separately)) / total households third party costs and pension deficit repair costs are excluded iii) Other costs per customer = total costs per customer - bad debt related costs per customer */ *Calculate smoothed depreciation over the sample period sort companycode financialyear bysort companycode: egen s_depreciation = mean(depreciation) *First we calculate the dependent variables at total level g DC_t = BM9002 + BM9003 label variable DC_t "Bad debt related costs" g sTC_tr = BM9030 + BM9002 + BM9003 + BM9007 + BM9033 + BM9019 + BM9020 + s_depreciation + netrecharges label variable sTC_tr "Totex for modelling" g sOC_tr = sTC_tr - DC_t label variable sOC_tr "Other opex for modelling" *We also calculate companies' outturn costs (ie using unsmoothed depreciation) g TC_tr = BM9030 + BM9002 + BM9003 + BM9007 + BM9033 + BM9019 + BM9020 + depreciation + netrecharges label variable TC_tr "Total costs" g OC_tr = TC_tr - DC_t label variable OC_tr "Other costs" /* As part of the IN Cost Assessment data request (April 2022) we asked water companies to restate their historical doubtful debt data for the years 2019-20, 2020-21 and 2021-22 ('smoothed' doubtful debt). This followed our identification that some companies had released or intended to release part of their bad debt provision. This suggested that their original provision was not as accurate as it could have been (particularly in relation to the impact of the Covid-19 pandemic). More accurate representations of bad debt costs could improve our econometric models. */ *We generate the same dependent variables using companies' restated smoothed doubtful debt data g DCsdebt_t = BM9002 + sdebt label variable DCsdebt_t "Bad debt related costs with smoothed doubtful debts" g sTCsdebt_tr = BM9030 + BM9002 + sdebt + BM9007 + BM9033 + BM9019 + BM9020 + s_depreciation + netrecharges label variable sTCsdebt_tr "Totex for modelling with smoothed doubtful debts" g sOCsdebt_tr = sTCsdebt_tr - DCsdebt_t label variable sOCsdebt_tr "Other opex for modelling with smoothed doubtful debts" *We also calculate companies' outturn costs (ie using unsmoothed depreciation) g TCsdebt_tr = BM9030 + BM9002 + sdebt + BM9007 + BM9033 + BM9019 + BM9020 + depreciation + netrecharges label variable TCsdebt_tr "Total costs with smoothed doubtful debts" g OCsdebt_tr = TCsdebt_tr - DCsdebt_t label variable OCsdebt_tr "Other costs with smoothed doubtful debts" *2c. - Unit conversion of variables *For variables in £ millions global Vars_in_million /// /*Ofwat*/ DC_t TC_tr OC_tr sTC_tr sOC_tr DCsdebt_t TCsdebt_tr OCsdebt_tr sTCsdebt_tr sOCsdebt_tr *For variables in 000s global Vars_in_000 /// /*Ofwat*/ hh_t *For variables in % global Vars_in_perc /// /*Ofwat*/ hhm_hh hhdu_hh /// /*External*/ eq_lpcf62 totalmigration incomescore_unadjusted incomescore_interpolated counciltax *For variables already in appropriate units global Vars_in_units /// /*Ofwat*/ rev_hh eq_rgc102 eq_xpcf2 *Million * 1,000,000 foreach v of varlist $Vars_in_million { summ `v' rename `v' `v'_million g `v' = `v'_million*1000000 label variable `v' "`v' (units)" } *Thousands * 1,000 foreach v of varlist $Vars_in_000 { summ `v' rename `v' `v'_000 g `v' = `v'_000*1000 label variable `v' "`v' (units)" } *Percentage * 100 (no change, only labels) foreach v of varlist $Vars_in_perc { summ `v' rename `v' `v'_perc g `v' = `v'_perc label variable `v' "`v' (%)" } summ $Vars_in_perc * Units * 1 (no change, only label) foreach v of varlist $Vars_in_units { summ `v' rename `v' `v'_unit g `v' = `v'_unit*1 label variable `v' "`v' (£/hh or nr)" } *2d. - Generate unit cost dependent variables (we model residential retail costs at unit cost level) g DC_hh = DC_t / hh_t label variable DC_hh "Bad debt related cost per household (£/hh)" g sTC_hh = sTC_tr / hh_t label variable sTC_hh "Total cost per household with smoothed depreciation(£/hh)" g sOC_hh = sOC_tr / hh_t label variable sOC_hh "Total cost less debt per household with smoothed depreciation(£/hh)" *Replicate the same dependent variables using smoothed doubtful debt data g DCsdebt_hh = DCsdebt_t / hh_t label variable DC_hh "Bad debt related cost per household using smoothed doubtful debt data (£/hh)" g sTCsdebt_hh = sTCsdebt_tr / hh_t label variable sTC_hh "Total cost per household with smoothed depreciation and smoothed doubtful debt data(£/hh)" g sOCsdebt_hh = sOCsdebt_tr / hh_t label variable sOC_hh "Total cost less debt per household with smoothed depreciation and smoothed doubtful debt data(£/hh)" *2e. - Transform variables to real terms *Keep only the relevant costs and cost drivers for the transformation in real terms and in logs keep codecombine companycode financialyear cpih /// DC* TC* OC* sTC* sOC* /// hh_t hhm_hh hhdu_hh /// rev_hh /// eq_lpcf62 eq_rgc102 eq_xpcf2 /// incomescore_unadjusted incomescore_interpolated /// counciltax /// totalmigration *Convert costs to real terms using CPIH foreach x of varlist DC* TC* OC* sTC* sOC* rev_hh { replace `x' = `x' * cpih label variable `x' "Real `x'" } *2f. - Transform variables to logs. We do not transform variables expressed in percentages foreach v of varlist DC* TC* OC* sTC* sOC* hh_t rev_hh eq_rgc102 eq_xpcf2 { g ln`v' = ln(`v') } *2g. - Export costs and cost drivers in Excel as a QA check for the calculations of costs and costs drivers in FM_RR1 export excel companycode financialyear codecombine /// DC_t TC_tr OC_tr /// sTC_tr sOC_tr /// DCsdebt_t TCsdebt_tr OCsdebt_tr /// sTCsdebt_tr sOCsdebt_tr /// hh_t hhm_hh hhdu_hh /// rev_hh /// eq_lpcf62 eq_rgc102 eq_xpcf2 /// incomescore_unadjusted incomescore_interpolated /// counciltax /// totalmigration /// using ".\RR-costs-and-cost-drivers.xlsx", sheet("Costs and costs drivers") sheetmodify firstrow(variables) *2h. - Export matrix of correlation coefficients to Excel corr * putexcel set ".\RR-correlation-matrix.xls", replace putexcel A1 = matrix(r(C)), names ************************************************************************************************************ * 3. SET UP PANEL DATASET FORMAT ************************************************************************************************************ *3a. - Set up panel dataset *Generate year variable to use for the panel time g year=real(substr(financialyear,1,4))+1 *Set up panel encode companycode, g(id) xtset id year *3b. - Generate time dummies, time trend and set time period /*Even though we do not use any time trend or years dummies in our PR19 models, we generate these variables should the reader want to test them. */ *Time trend egen timetrend = group(financialyear) *Time dummies tab year, g(dummyyear) *Set modelling period start and end global year1 2014 global year2 2022 /*Also define the sample period. The model period refers to the period for our econometric models. The catch-up period refers to the last five years of the historical period. */ g modelperiod = 1 if year < 2023 g catchupperiod = 1 if year > 2017 & year < 2023 *3c. - Remove unnecessary companies *Drop SVT and DVW in 2018-19 as we use SVE and HDD for that year drop if companycode=="SVT" & year==2019 drop if companycode=="DVW" & year==2019 *Drop SWT and BWH for 2013-14 to 2015-16 as we use SWB for those years drop if companycode == "SWT" drop if companycode == "BWH" ************************************************************************************************************ * 4. SET UP MACROS FOR REGRESSIONS ************************************************************************************************************ *4a. - Bad debt related costs /* i. RDC1 = bad debt per household = average bill size + probability of default (using Equifax lpcf62) */ global reg1 lnDC_hh /// lnrev_hh eq_lpcf62 /* ii. RDC2 = bad debt per household = average bill size + probability of default (using IMD) + transience */ global reg2 lnDC_hh /// lnrev_hh incomescore_unadjusted totalmigration *4b. - Other (totex minus bad debt) costs /*i ROC1 = Totex less debt per household = proportion of dual households + proportion of metered households */ global reg3 lnsOC_hh /// hhdu_hh hhm_hh /*ii ROC2 = Totex less debt per household = proportion of dual households + proportion of metered households + number of connected households */ global reg4 lnsOC_hh /// hhdu_hh hhm_hh lnhh_t *4c. - Total costs /* i. RTC1 = totex per household = average bill size + proportion of metered households + probability of default (using Equifax lpcf62) */ global reg5 lnsTC_hh /// lnrev_hh hhm_hh eq_lpcf62 /* ii. RTC2 = totex per household = average bill size + proportion of metered households + probability of default (using Equifax lpcf62) + number of households */ global reg6 lnsTC_hh /// lnrev_hh hhm_hh eq_lpcf62 lnhh_t /* iii. RTC3 = totex per household = average bill size + proportion of metered households + probability of default (using IMD) + transience + number of households */ global reg7 lnsTC_hh /// lnrev_hh hhm_hh incomescore_unadjusted totalmigration lnhh_t /* The following section has been commented out but the code can be used to test models using the smoothed doubtful debt data companies re-stated in July 2022. *4d. - Replicate the same specifications using smoothed doubtful debt data global reg8 lnDCsdebt_hh /// lnrev_hh eq_lpcf62 global reg9 lnDCsdebt_hh /// lnrev_hh incomescore_unadjusted totalmigration global reg10 lnsOCsdebt_hh /// hhdu_hh hhm_hh global reg11 lnsOCsdebt_hh /// hhdu_hh hhm_hh lnhh_t global reg12 lnsTCsdebt_hh /// lnrev_hh hhm_hh eq_lpcf62 global reg13 lnsTCsdebt_hh /// lnrev_hh hhm_hh eq_lpcf62 lnhh_t global reg14 lnsTCsdebt_hh /// lnrev_hh hhm_hh incomescore_unadjusted totalmigration lnhh_t */ ************************************************************************************************************ * 5. - RUN REGRESSIONS AND STATISTICAL TESTS ************************************************************************************************************ *5a. - Pooled OLS with clustered standard errors at company level (pooled OLS regressions have been added for reference) forvalues i = 1(1)7 { /* Regressions */ eststo ols`i' : reg ${reg`i'}, vce(cluster id) estadd scalar RSS = e(rss): ols`i' local RSS = e(rss) local df = e(df_m) predict residuals`i',resid /* R2 adjusted */ estadd scalar Adj_R_squared = e(r2_a): ols`i' /* RESET test */ ovtest estadd scalar RESET_P_value = r(p): ols`i' /* VIF test */ vif estadd scalar VIF_statistic = r(vif_1): ols`i' /*Pooling Test */ local foryears = "${year1}/${year2}" scalar N_rest = (${year2}-${year1})*(`df'+1) // N_res = number of restrictions scalar rss_unrest = 0 forvalues y = `foryears' { quietly regress ${reg`i'} if year==`y' scalar rss_unrest = rss_unrest+e(rss) // Sum up RSS for each year in sample period } scalar df_unrest = (${year2}-${year1}+1)*(e(N)-(e(df_m)+1)) scalar F_num = (`RSS'-rss_unrest)/(N_rest) scalar F_denom =(rss_unrest)/(df_unrest) scalar F_cor = F_num/F_denom // F statistic for pooling estadd scalar Pooling = 1-F(N_rest,df_unrest,F_cor): ols`i' /* Normality test */ sktest residuals`i' estadd scalar Normality = r(P_chi2): ols`i' /* Heteroskedasticity test */ quietly eststo olshet`i': reg ${reg`i'} estat hettest estadd scalar Heteroskedasticity = r(p): ols`i' eststo drop olshet`i' /* Econometric_model title */ estadd local Estimation_method = "Pooled OLS": ols`i' } *5b. - Random effects forvalues i = 1(1)7 { /* Regressions */ eststo re`i' : xtreg ${reg`i'}, re vce(cluster id) /* Yhats (in levels) */ predict yhatre`i' , xb replace yhatre`i' = exp(yhatre`i') /* Residuals */ predict ere`i' , ue /* R2 adjusted */ estadd scalar Adj_R_squared = e(r2_o): re`i' *Breusch Pagan LM test for RE xttest0 estadd scalar LM = r(p): re`i' /* RESET - the following lines calculate the RESET test /// as Stata does not have a command for random effects models */ quietly sum yhatre`i' g nmlz_xb`i' = (yhatre`i'-r(mean))/r(sd) g xb2`i' = (nmlz_xb`i')^2 g xb3`i' = (nmlz_xb`i')^3 g xb4`i' = (nmlz_xb`i')^4 xtreg ${reg`i'} xb2`i' xb3`i' xb4`i' test xb2`i' xb3`i' xb4`i' estadd scalar RESET_P_value = r(p): re`i' /* Econometric_model title */ estadd local Estimation_method = "RE": re`i' } ************************************************************************************************************* * 6. - CALCULATE EFFICIENCY SCORES ************************************************************************************************************* *6a. - Calculate actual costs g companycodemerger = companycode /*replace companycodemerger = "SWB" if inlist(companycode,"BWH","SWT") For the catch up challenge we would need to sum up SWT and BWH costs as we estimate an efficiency score for SWB. However this command has been commented out because we have dropped SWT and BWH from the panel and use SWB instead. */ *Estimate actual costs bysort companycodemerger: egen actualcostDC_t = sum(DC_t) if catchupperiod == 1 bysort companycodemerger: egen actualcostOC_tr = sum(OC_tr) if catchupperiod == 1 bysort companycodemerger: egen actualcostTC_tr = sum(TC_tr) if catchupperiod == 1 *6b. - Calculate predicted costs /*Estimate triangulated costs per each year and per each model and level of aggregation. Multiply by the number of households to transform modelled unit costs (£/hh) to modelled total costs (£). Then sum the modelled cost over the last 5 years of the sample period. */ *Sum of modelled cost over the last 5 years, for each regression forvalues i = 1(1)7 { g predictedcostreg`i' = yhatre`i' * hh_t bysort companycodemerger: egen modelledcostreg`i' = sum(predictedcostreg`i') if catchupperiod == 1 } *Sum of modelled cost over the last 5 years, for each level of aggregation g predictedcostDC_t = (yhatre1 * hh_t * 0.5) + (yhatre2 * hh_t * 0.5) g predictedcostOC_tr = (yhatre3 * hh_t * 0.5) + (yhatre4 * hh_t * 0.5) g predictedcostTC_tr = (yhatre5 * hh_t * 1/3) + (yhatre6 * hh_t * 1/3) + (yhatre7 * hh_t * 1/3) bysort companycodemerger: egen modelledcostDC_t = sum(predictedcostDC_t) if catchupperiod == 1 bysort companycodemerger: egen modelledcostOC_tr = sum(predictedcostOC_tr) if catchupperiod == 1 bysort companycodemerger: egen modelledcostTC_tr = sum(predictedcostTC_tr) if catchupperiod == 1 *Estimate bottom up and top down costs g predictedbottomup = predictedcostDC_t + predictedcostOC_tr g predictedtopdown = predictedcostTC_tr *Triangulate bottom up and top down costs to estimate our predicted costs g predictedcost = (predictedbottomup * 0.25) + (predictedtopdown * 0.75) bysort companycodemerger: egen triangulatedcost = sum(predictedcost) if catchupperiod == 1 *6c. - Calculate efficiency scores and ranking g efficiencyscore = actualcostTC_tr / triangulatedcost egen rank = rank(efficiencyscore) if year == 2022 *Calculate efficiency scores at regression level g efficiencyscorereg1 = actualcostDC_t / modelledcostreg1 g efficiencyscorereg2 = actualcostDC_t / modelledcostreg2 g efficiencyscorereg3 = actualcostOC_t / modelledcostreg3 g efficiencyscorereg4 = actualcostOC_t / modelledcostreg4 g efficiencyscorereg5 = actualcostTC_t / modelledcostreg5 g efficiencyscorereg6 = actualcostTC_t / modelledcostreg6 g efficiencyscorereg7 = actualcostTC_t / modelledcostreg7 *Calculate efficiency scores at each level of aggregation g efficiencyscoreDC_t = actualcostDC_t / modelledcostDC_t g efficiencyscoreOC_tr = actualcostOC_tr / modelledcostOC_tr g efficiencyscoreTC_tr = actualcostTC_tr / modelledcostTC_tr ************************************************************************************************************* * 7. - EXPORT RESULTS ************************************************************************************************************* *7a. - Save all results in matrices *Create a rank matrix of efficiency scores and rankings mkmat rank if(year==2022), mat(rank) rownames(companycode) mkmat efficiencyscore if(year==2022), mat(efficiencyscore) rownames(companycode) mkmat efficiencyscoreDC_t if(year==2022), mat(efficiencyscoreDC_t) rownames(companycode) mkmat efficiencyscoreOC_tr if(year==2022), mat(efficiencyscoreOC_tr) rownames(companycode) mkmat efficiencyscoreTC_tr if(year==2022), mat(efficiencyscoreTC_tr) rownames(companycode) forvalues i = 1(1)7 { mkmat efficiencyscorereg`i' if(year==2022), mat(efficiencyscorereg`i') rownames(companycode) } *Name the matrix matrix rank = rank matrix efficiencyscore = efficiencyscore matrix efficiencyscoreDC_t = efficiencyscoreDC_t matrix efficiencyscoreOC_tr = efficiencyscoreOC_tr matrix efficiencyscoreTC_tr = efficiencyscoreTC_tr forvalues i = 1(1)7 { matrix efficiencyscorereg`i' = efficiencyscorereg`i' } *7b. - Export results *Export results without p-values or stars suggesting significance, to allow for multiplication with cost drivers in feeder models estout * using ".\RR-coefficients.xls", replace cells(b(fmt(10))) stats(depvar) *Export results with p-values and stars suggesting significance estout * using ".\RR-coefficients-stars.xls", replace /// cells(b(star fmt(3)) /// p(par({ }))) /// starlevels( * 0.10 ** 0.05 *** 0.010) /// stats ( /// depvar /// Estimation_method /// N /// vce /// Adj_R_squared /// RESET_P_value /// VIF_statistic /// Pooling /// Normality /// Heteroskedasticity /// LM /// ) /// mlabels(,titles) *Export the following matrices: efficiency ranking and efficiency scores estout matrix(rank) using ".\RR-coefficients-stars.xls" , append estout matrix(efficiencyscore) using ".\RR-coefficients-stars.xls" , append estout matrix(efficiencyscoreDC_t) using ".\RR-coefficients-stars.xls" , append estout matrix(efficiencyscoreOC_tr) using ".\RR-coefficients-stars.xls" , append estout matrix(efficiencyscoreTC_tr) using ".\RR-coefficients-stars.xls" , append forvalues i = 1(1)7 { estout matrix(efficiencyscorereg`i') using ".\RR-coefficients-stars.xls" , append } *7c. - Export time and date of run g run_time_stamp = "$S_TIME" g run_date_stamp = "$S_DATE" export excel run_date_stamp run_time_stamp using ".\RR-coefficients-datestamp.xls", cell (A1) sheetmodify firstrow(variables) *************************************************************************************************************