Announcement

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

  • errors when using isko to transfer ISCO-88 to ISEI

    Hi, when I use isko command to transfer ISCO-88 to ISEI, I first have the following error.
    iskoisei fisei, isko(focc)
    command B is unrecognized
    (error occurred while loading iskoisei.ado)
    r(199);

    end of do-file


    After I delete letter B in the ado file, I have the following error, which I do not know how to solve. Thanks for your help.

    iskoisei fisei, isko(focc)
    program error: code follows on the same line as open brace
    (error occurred while loading iskoisei.ado)
    r(198);

    end of do-file

  • William Lisowski
    replied
    To anyone who finds this topic, the iscogen package, written by Ben Jann and released today through SSC, has the capabilities provided by the isco and isko packages, and much more. For more detalis, see the output of

    Code:
    ssc describe iscogen

    Leave a comment:


  • Yapeng Wang
    replied
    Originally posted by Gobinda Natak View Post
    I think that this command: https://github.com/dirtyhawk/stata-derivescores supersedes the old isko commands, by the way.

    Go
    Hi Gobinda, thanks for sharing it.

    Leave a comment:


  • Gobinda Natak
    replied
    I think that this command: https://github.com/dirtyhawk/stata-derivescores supersedes the old isko commands, by the way.

    Go

    Leave a comment:


  • Yapeng Wang
    replied
    Originally posted by Amelie Nickel View Post
    Hallo,

    I am now facing the same problem. I am using Stata version 12.1 and using data from the European Social Survey Round 6.

    I want to transfer the variable "isco08" into the isei-scale and therefor i wanted to use the isko-package as well.

    When i type the following syntax i get the same error as Yapeng Wang.
    Code:
    ssc install isko
    
    iskoisei newvar, isko(isco08)
    
    command B is unrecognized
    (error occurred while loading iskoisei.ado)
    I am not sure how you solved this problem.
    I copied the syntax from the ado.file into my dofile and deleted the "B" at the end of the ado.
    After this i tried the command again and got another error:

    Code:
    iskoisei test, isko(isco08)
    unrecognized command: / invalid command name
    Maybe you could explain to me how you finally solved the problem? I also contaced the author Mr. Hendrickx, who answered "Unfortunately, I don't have access to Stata anymore. Sorry I can't help".

    Thanks in advance and kind regards,
    Amelie
    Hi, I simply copy all the codes from the ado file, and run it in my do file. Hope it helps. Sorry for the late reply.

    Leave a comment:


  • Joaquin Carrascosa
    replied
    I had this problem a long time ago but i just went around it another way.

    To convert ISKO into ISEI you can download the SPSS module from http://www.harryganzeboom.nl/isco08/index.htm
    You paste the syntax into excel, split it into columns (data->text into columns) using space to split it. Now you have a column with the ISKO codes and another one with the corresponding ISEI codes. All yoy have to do now is use excel to "adapt" the spss syntax to stata. Don´t forget to add codes for 9998 and 9999 if those codes where used. Also check for ISKO codes (usually coding errors) that don´t get converted to ISEI when you run the do file.

    Leave a comment:


  • Jorrit Gosens
    replied
    I'm not sure what went wrong exactly.
    The advice in the thread so far has been to find the iskoisei.ado file (usually in you c:\ado\plus, delete the B there, save, and everything should be fine.
    What you do would aslo work, and I just tried copy pasting the iskoisei.ado in a do file, deleted the B, ran it, and it works fine.
    So you probably deleted a bit more, or your error is from another line in your ado file.
    Have another look at your ado file, possible with set trace on to idenitfy the line that causes the trouble

    Leave a comment:


  • Amelie Nickel
    replied
    Hallo,

    I am now facing the same problem. I am using Stata version 12.1 and using data from the European Social Survey Round 6.

    I want to transfer the variable "isco08" into the isei-scale and therefor i wanted to use the isko-package as well.

    When i type the following syntax i get the same error as Yapeng Wang.
    Code:
    ssc install isko 
    
    iskoisei newvar, isko(isco08) 
    
    command B is unrecognized
    (error occurred while loading iskoisei.ado)
    I am not sure how you solved this problem.
    I copied the syntax from the ado.file into my dofile and deleted the "B" at the end of the ado.
    After this i tried the command again and got another error:

    Code:
    iskoisei test, isko(isco08)
    unrecognized command:  / invalid command name
    Maybe you could explain to me how you finally solved the problem? I also contaced the author Mr. Hendrickx, who answered "Unfortunately, I don't have access to Stata anymore. Sorry I can't help".

    Thanks in advance and kind regards,
    Amelie

    Leave a comment:


  • Yapeng Wang
    replied
    I contacted the author of the package, but the email address is no longer valid. Then I contacted Stata, and they replied as follows:
    "The author would need to make the change(s) and repost the command. We don't have that ability. From a simple search, it appears this has come up in the past. From previous responses, you can manually remove the letter B at the end of iskoisei.ado (as you've done). After that it will work."

    Leave a comment:


  • Yapeng Wang
    replied
    Now I copy and paste the ado file command into my dofile. After I run it, I get the result that I want. I will provide the author's reply when I receive it. Thank you all very much!

    Leave a comment:


  • Yapeng Wang
    replied
    Originally posted by Robert Picard View Post
    Both isco and isko are available from SSC. From the help file for iscoisei:
    and from the help file for iskoisei:

    So if the OP wants to convert ISCO-88 codes, the isko package is the one to use.

    I can replicate the issue in #1:
    Code:
    . cap ado uninstall isko
    
    .
    . ssc install isko
    checking isko consistency and verifying not already installed...
    installing into /Users/robert/Library/Application Support/Stata/ado/plus/...
    installation complete.
    
    .
    . * Example generated by -dataex-. To install: ssc install dataex
    . clear
    
    . input int focc
    
    focc
    1. 1110
    2. 1141
    3. end
    
    .
    . iskoisei fisei, isko(focc)
    command B is unrecognized
    (error occurred while loading iskoisei.ado)
    r(199);
    
    end of do-file
    The last few lines of "iskoisei.ado" are (and include an end of line character on the last line)
    Code:
     quietly replace `varlist'=22 if (`isko' == 9331)
    quietly replace `varlist'=22 if (`isko' == 9332)
    quietly replace `varlist'=30 if (`isko' == 9333)
    end
    B
    If you copy "iskoisei.ado" to the current directory and remove the offending "B" at the end of the ado file, you do not get the error anymore since the offending command has been removed.

    If I leave the "B" but remove the final end of line character, I get no error. So it looks like this may indeed be related to the issue of code on the last line without an end of line character (as pointed out by Sergiy) and the outcome depends on how the file was downloaded. No matter what, extra text at the end of a do-file will produce an error if it is not valid Stata code. For example, save the following in a file called "whatsup.ado" in the current directory:
    Code:
    program whatsup
    dis "hello"
    end
    noi dis "this is valid code"
    saywhat
    If you try to run the program, you get:
    Code:
    . whatsup
    this is valid code
    command saywhat is unrecognized
    (error occurred while loading whatsup.ado)
    r(199);
    So the author should be contacted so that he can remove the offending "B".
    Thank you! I did remove the B from the adofile. But after I removed it, stata reported an error about open brace. I will contact the author.

    Leave a comment:


  • Yapeng Wang
    replied
    Originally posted by Sergiy Radyakin View Post
    The problem is probably related to issue 1428168. There is no line break at the end of the ado file, so the letter B that is there is not visible to Stata, when it loads the original ado file. Here is an example:

    Code:
    . clear all
    
    . set obs 1
    number of observations (_N) was 0, now 1
    
    . gen i=8400
    
    . iskoisei y , isko(i)
    
    . l
    
    +-----------+
    | i y |
    |-----------|
    1. | 8400 24 |
    +-----------+
    I believe that Yapeng Wang has probably copied the content of the ado file into his do file, in which case the B will be a command since it will be followed by his own commands. The error quoted by him refers to a brace { which is nowhere to find in the original file. So it must be something else. Running with trace on should expose the erroneous code.


    Daniel, one ado file can define multiple programs. Look at ados for graphing commands for examples. Also ados may include mata code that needs to be compiled on the fly when the command is to be prepared.
    Thank you! I did not copy and paste the ado file to my dofile, and I do not know why there is an error about the open brace when I delete the B from the original ado file.

    Leave a comment:


  • Yapeng Wang
    replied
    Originally posted by Yapeng Wang View Post
    Hi, when I use isko command to transfer ISCO-88 to ISEI, I first have the following error.
    iskoisei fisei, isko(focc)
    command B is unrecognized
    (error occurred while loading iskoisei.ado)
    r(199);

    end of do-file


    After I delete letter B in the ado file, I have the following error, which I do not know how to solve. Thanks for your help.

    iskoisei fisei, isko(focc)
    program error: code follows on the same line as open brace
    (error occurred while loading iskoisei.ado)
    r(198);

    end of do-file
    Thanks. But after I put the B.ado file in the ado folder, I got following error
    Code:
    iskoisei fisei,isko(focc)
    program error:  code follows on the same line as open brace
    (error occurred while loading B.ado)
    (error occurred while loading iskoisei.ado)

    Leave a comment:


  • Yapeng Wang
    replied
    Originally posted by Jorrit Gosens View Post
    I have the ado from here: http://fmwww.bc.edu/repec/bocode/i/iskoisei.ado
    Defining the program does also give the 'command B is unrecognized' error, but the program runs with or without the unnecesary B in the ado that defines the program.
    Are you using the line 'iskoisei fisei, isko(focc)' as part of a longer ado? Tell us about that if so.
    Thank you. No, when I installed the package, I just ran the command iskoisei fisei, isko(focc) as shown in the help isko window.

    Leave a comment:


  • Yapeng Wang
    replied
    Originally posted by Sergiy Radyakin View Post
    Yapeng Wang,

    when I ask Stata what is iskoisei it says it doesn't know:

    Code:
    . which iskoisei
    command iskoisei not found as either built-in or ado-file
    r(111);
    Hence see #12.1 here.

    Best, Sergiy Radyakin
    Sorry, I did not make it clear. It is from a SSC installed package isko in STATA 14.2

    Leave a comment:

Working...
X