Announcement

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

  • Problem with destring command "int not allowed" error

    Dear all,

    when applying the following command :

    [destring var1, replace]
    I receive this error message :
    int not allowed

    It is weird since this command has always worked very well until now. It might have to do with the type of variable, but I have checked and not found anything special. Any idea ? Many thanks




  • #2
    Hello Pierre Blavier. Welcome to Statalist. Members will be better able to help you if you provide a small sample dataset (plus code) that illustrates the problem. See Section 12.2 of the FAQ for more info on how to do that. See also Section 12.3 on how to use code delimiters. Thanks.
    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 19.5 (Windows)

    Comment


    • #3
      First, I'll assume you did not actually enclose the command in square brackets when you tried to run it. That would be a syntax error, but the error message would be different from what you show.

      Without the square brackets, there is nothing obviously wrong with the command. So the problem is likely to be something strange in the data. Please use the -dataex- command to post an example from your data. Be sure that the example you post produces this same error message.

      If you are running version 18, 17, 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

      When asking for help with code, always show example data. When showing example data, always use -dataex-.

      Added: Crossed with #2.

      Comment

      Working...
      X