Announcement

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

  • Saving variable and label assignment

    Hi, I am new to Stata. Wondering how do I save my variable name and label properties, so that I can apply the same name and properties to a new dataset from another excel?
    - I tried to label save using mylabels.do, however when I execute the labels do file, the variables and labels remain unchanged in the new dataset from another excel.
    Thank you!

  • #2
    I guess that "another excel" means something like "another dataset I read in from MS Excel". Where a dataset comes from is not itself of importance.

    Every dataset will have variable names even if they are dopey. For example, many datasets will have names such as A B C ... that originate from spreadsheet column names. You can rename these variables and one way to do that would be a do file with a series of rename statements.

    Similarly attaching variable labels and/or value labels that you used in a previous dataset could often be done using a do-file, but I don't follow whether labels for you means variable labels, value labels, or both.

    I think we need more concrete detail to say more.

    Comment

    Working...
    X