Login or Register
Log in with
Forums
FAQ
Search in titles only
Search in General only
Advanced Search
Search
Home
Forums
Forums for Discussing Stata
General
You are not logged in. You can browse but not post. Login or
Register
by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the
FAQ
.
Announcement
Collapse
No announcement yet.
X
Collapse
Posts
Latest Activity
Search
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Filtered by:
Clear All
new posts
smith Jason
Join Date:
Sep 2020
Posts:
378
#1
How can I use Stata to generate 50 consecutive strings like star1 star2 star3 star4 star5........star50?
02 Jul 2021, 11:51
As the title suggested, I know how to use R to generate them. However, I don't know how to do that in Stata.
Thank you for your help!
Sergiy Radyakin
Join Date:
Apr 2014
Posts:
1867
#2
02 Jul 2021, 12:00
Code:
set obs 50 generate wanted="star"+string(_n)
How do you do the same in R?
Comment
Post
Cancel
smith Jason
Join Date:
Sep 2020
Posts:
378
#3
02 Jul 2021, 12:12
Thank you!
How can I generate an equation using Stata like this: max_30=star1+star2+......star50.
Comment
Post
Cancel
Rich Goldstein
Join Date:
Mar 2014
Posts:
4455
#4
02 Jul 2021, 12:26
see the rowtotal option in
Code:
help egen
whoops - missed that these were string variables - see, instead, the "concat" option of the same command; why do you want this anyway?
Comment
Post
Cancel
smith Jason
Join Date:
Sep 2020
Posts:
378
#5
02 Jul 2021, 12:40
Because I don't want to write a lot in the console of Stata software. Thank you!
Comment
Post
Cancel
Previous
Next
Working...
Yes
No
OK
OK
Cancel
X
Comment