Ask Experts Questions for FREE Help!
Ask    ||    Answer
 
Advanced  
 

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Education > Homework Help > Math & Sciences   »   Stata Command

 
Thread Tools Search this Thread Display Modes
Question
 
 
#1  
Old Oct 29, 2009, 01:42 AM
Lot2Learn
New Member
Lot2Learn is offline
 
Join Date: Oct 2009
Posts: 2
Lot2Learn See this member's comment history on his/her Profile page.
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?

Reply With Quote
 
     

Answers
 
 
Old Oct 29, 2009, 06:08 AM   #2  
Full Member
ArcSine is offline
 
Join Date: Jun 2009
Location: Charlotte, NC
Posts: 397
ArcSine See this member's comment history on his/her Profile page.
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

Comments on this post
Unknown008 agrees: Great advice!
  Reply With Quote
 
     
 
 
Old Oct 29, 2009, 08:20 AM   #3  
New Member
Lot2Learn is offline
 
Join Date: Oct 2009
Posts: 2
Lot2Learn See this member's comment history on his/her Profile page.
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.
  Reply With Quote
 
     

Your Answer
Email me when someone replies to my answer
Join Login





Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

 
Similar Sponsors


Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

Similar Threads
command line is telling that "javac" is no internal or external command
(1 replies)
Run Command Error when trying to execute a command
(4 replies)
Orgasm on command
(19 replies)
Dual Stata (India and USA)
(6 replies)
ALL STATA class action
(0 replies)

Search this Thread

Advanced Search

Bookmarks

Sponsors



Copyright ©2003 - 2009, Ask Me Help Desk.
All times are GMT -8. The time now is 07:31 PM.