Statalist The Stata Listserver


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

Re: st: Data editor creates new var1


From   "Ada Ma" <[email protected]>
To   [email protected]
Subject   Re: st: Data editor creates new var1
Date   Sun, 11 Jun 2006 12:47:32 +0100

Hi Carter,

You can save a lot of time and hassle by saving your excel sheet in
CSV format - you can do that by choosing the file format within Excel
- say after saving carter.xls, save an extra copy as carter.csv.

Once you have done that, go back into Stata, making sure you're in the
right directory within Stata, type:

insheet using carter.csv, clear

Then you'll get your whole data set in front of you and no more
editing data by hand within Stata.  Stata is a statisical package and
IMHO doesn't do v well as a data editor.

Some recommendations:
if you're planning to do some permanent / update your data set, I'd
recommend that if you make changes to your original data carter.xls,
not carter.csv, as the CSV format doesn't save the equations, and it
won't allow you to set the format of the variables, therefore if your
data set have identifiers such as 5E1, 5E2, ... , etc. (like I do with
some geographical identifiers in England), the CSV format would view
it as numerical values.

On the long run you might want to read the User Guide - there is a
section on how to enter data into Stata and it looks like you either
haven't read the [U] or you have skipped!


On 6/10/06, Carter Rees <[email protected]> wrote:
Statalisters,

I am working with Stata 9.1/Windows XP.  I am hand entering data into the
data editor across 38 variables.  Three variables are string with remaining
number in a %9.2f format.  Once I have entered a case I go to an Excel
spreadsheet and check off that case on my to-do list.  When I return to
Stata I notice that my data editor now has a new variable called VAR1 which
also has a %9.2f format, has the value label missing assigned to it (as do
the other numeric variables), and has the variable name of the variable
immediately preceding it.  VAR1 has data in it that is supposed to be
assigned to another variable.

This odd behavior has happened twice now and I noticed that my variable name
INTALNASL was removed from the data in both instances but the data
corresponding to it remains.  The variable names are simply shifted to the
right by one variable.

Is there a combination of keys that I may be pressing that would cause the
new variable to be created with the data editor open?  My data remains
unaffected which is a bonus but renaming my variables so they match the
correct column is time consuming and annoying.

Regards,

Carter

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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