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]

st: cfout for double data entry validation and corrections - readreplace command error


From   Nicola Pocock <[email protected]>
To   [email protected]
Subject   st: cfout for double data entry validation and corrections - readreplace command error
Date   Thu, 18 Jul 2013 01:30:16 +0100

> Hi there,
> 
> I've been using cfout to compare 2 datasets to check for differences, as part of double data entry validation. The command cfout generates a list of differences, and then a .csv file into which I need to specify the correct value - I then use readreplace command, this takes the correct values from the .csv file and updates the incorrect value. I was getting on fine with this last week, but when I returned to updating today I am getting "invalid syntax r(198)" after the readreplace command:
> 
> **set directory
> cd "H:"
> use "H:\dataentry1.dta"=20
> sort id
> 
> **check no of differences (specify variables)
> cfout V01-V84_interup using "H:\dataentry2.dta", id(id)
> 
> **discrepancy report should be in working directory, as well as correctedvalues.csv file. Make replacements using corrected data in csv. file
> readreplace using "correctedvalues.csv", id(id)
> 
> invalid syntax r(198);
> 
> I am unsure why this is happening. I have uninstalled cfout, and tried re-installing it to no avail. I am unsure whether when I uninstall and reinstall cfout, if the ancilliaryfiles that come with cfout (these generate the csv.file in which one can do the corrections) also uninstalls and reinstalls. There is a typo in the readreplace command (have tried several iterations), so am wondering why else I might be getting r(198) error.
> 
> Any ideas/ insight from Statalistservers who have used cfout re. above gratefully received. 
> 
> Many thanks in advance, 
> Nicola


*
*   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