Ask Experts Questions for FREE Help !
Ask
    Lot2Learn's Avatar
    Lot2Learn Posts: 2, Reputation: 1
    New Member
     
    #1

    Oct 29, 2009, 01:42 AM
    Stata Command
    I want to create a variable with a specific range. For instance, this is the command I used:

    .gen Rel = 0
    .replace Rel = 5 if rel_pref > 2 & < 9

    I received an error message that said < 9 was invalid. But there is a value 9. So is there something wrong with the command?
    ArcSine's Avatar
    ArcSine Posts: 969, Reputation: 106
    Senior Member
     
    #2

    Oct 29, 2009, 06:08 AM
    I'm not familiar with Stata's syntax, but here's a shot in the dark: Maybe you need to explicitly specify the variable for both of the inequalities, as in

    [variable] > 2 & [variable] < 9
    Lot2Learn's Avatar
    Lot2Learn Posts: 2, Reputation: 1
    New Member
     
    #3

    Oct 29, 2009, 08:20 AM
    Thanks a lot! I tried it and it worked. I'm kind of new at Stata, and I don't always understand their help guides as they are written so technically.

    I really appreciate your help.
    rajeshms's Avatar
    rajeshms Posts: 1, Reputation: 1
    New Member
     
    #4

    Dec 3, 2009, 12:05 AM
    You its correct...

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search


Check out some similar questions!

Command line is telling that "javac" is no internal or external command [ 1 Answers ]

Hi fellow I have just started java , my operating system is windows vista , I have installed java but when I give "javac" command on command line after writng the code in note pad the command line gives an error that javac is not an internal or exetrnal command... if any 1 can help ...

Run Command Error when trying to execute a command [ 4 Answers ]

I just had my laptop re-imaged with a new Updated Windows XP CD running SP3, however, When I go to START | RUN It does not matter if I type in a Server name on the network or just CMD. I get the message below and it will not execute. Is there something I can do to fix this? “This file does not...

Orgasm on command [ 19 Answers ]

My question is how do you train the woman to orgasm on command.. I would very much like to know ;) <EDIT> I am a woman myself.. to clear up miscommunication.. I was speaking in general

Dual Stata (India and USA) [ 6 Answers ]

I am working in USA from 15 Sep 2007. I came along with wife and kid. I am on L1 Visa and my wife and kid are on L2 visa. (1) Can you please let me know which Income tax form is required to fill and submit in IRS office? (2) Do I need to show Indian salary detail? If yes then how? Thanks...


View more questions Search