tag:blogger.com,1999:blog-5290984163937382875.post417234010002329473..comments2018-07-05T16:13:57.446+03:00Comments on The Stata Project-Oriented Guide: Step #6: Automation - Separating the Men from the Boysstatamanhttp://www.blogger.com/profile/13749462261829425392noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-5290984163937382875.post-60626586939287437582018-06-02T04:08:26.599+03:002018-06-02T04:08:26.599+03:00https://analytics.googleblog.com/2015/01/accuweath...https://analytics.googleblog.com/2015/01/accuweather-unlocks-cross-channel.html<br />http://www.womenshealth.northwestern.edu/blog/november-american-diabetes-month?page=4#comment-774291<br />http://www.cbtinterpretations.com/blog/2014/05/17/What-Mindfulness-IS.aspx<br />http://www.hosteers.com/node/46?page=8685#comment-434716<br />http://www.neca-neis.org/code-question-of-the-day/code-question/cqd-for-4-2-2014<br />https://kirimmobilkaltim.blogspot.com/2015/10/other-language-do-follow-blogs.html?showComment=1525931567632#c2986505331072951762<br />https://www.usprisonertransport.com/adding-new-vehicles-to-our-fleet/#comment-13597<br />https://founderu.selz.com/7-steps-create-sell-ebook-website/#comment-122354<br />http://www.ligams.com/blog/ezpublish/linkcheck<br />https://www.blogger.com/comment.g?blogID=5290984163937382875&postID=417234010002329473&page=1&token=1525932166187<br />mety susilawatihttps://www.blogger.com/profile/13783250857113674978noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-46335061365770626472018-05-21T04:33:06.686+03:002018-05-21T04:33:06.686+03:00THANKS FOR INFORMATION AND PERMISSION SHARE
http:...THANKS FOR INFORMATION AND PERMISSION SHARE <br />http://www.klikgamat.com/p/blog-page.html<br />http://www.klikgamat.com/2018/05/obat-mujarab-luka-diabetes_19.htmlmety susilawatihttps://www.blogger.com/profile/13783250857113674978noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-25336339537887221692018-05-10T09:02:46.187+03:002018-05-10T09:02:46.187+03:00Terima kasih izin ngeshare ya http://gamatori.comTerima kasih izin ngeshare ya http://gamatori.commety susilawatihttps://www.blogger.com/profile/13783250857113674978noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-30354624277789111322016-02-23T10:45:16.685+02:002016-02-23T10:45:16.685+02:00This comment has been removed by the author.e3clearyhttps://www.blogger.com/profile/07135848066178338743noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-56322144927023872622014-08-27T17:42:40.370+03:002014-08-27T17:42:40.370+03:00Dear Stataman,
Thank you so much for your tutoria...Dear Stataman, <br />Thank you so much for your tutorial.However I tried to apply some of the Stata codes in your blog for my analysis, but it didn't work. <br /><br />My dataset contains a set of 4 dependent variables which were cost1, cost2, cost3, cost4, and a set of 4 explanatory variables such as country, company, market, province. My aim is to run regression models to find out the significant explanatory variables. Basically I want the full model and the reduced models for each of the costs which were as followings:<br /><br />Cost 1 <- a + b1country + b2company + b3market + b4province<br />Cost 1<-a + b1country + b2company + b3market <br />Cost 1<- a + b1 country + b2company<br />Cost1<-a+b1country<br /><br />Cost 2 <- a + b1country + b2company + b3market + b4province<br />Cost 2<-a + b1country + b2company + b3market <br />Cost 2<- a + b1 country + b2company<br />Cost2<-a+b1country <br /><br />and so on.....to Cost n <br /><br />Would you please help me with the loops code as it would take ages to run each regression individually?<br /><br />Thank you so much! FongTran Phuonghttps://www.blogger.com/profile/08051545852317227116noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-30553365836620058682014-02-22T20:18:14.805+02:002014-02-22T20:18:14.805+02:00very good information and Inspiring & Interest...very good information and Inspiring & Interesting.<br /><br />success always<br />http://tokoobatbiusasli.blogspot.comaneka obathttps://www.blogger.com/profile/16064339766200853342noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-87376338667326396782013-05-30T03:10:06.494+03:002013-05-30T03:10:06.494+03:00Thank you very much for all of your advises!! They...Thank you very much for all of your advises!! They have been really helpful to my work! I just wanted to make one remark in the kindest way possible: I believe that the title of the post is quite sexist. Like, if only 'men' use this kind of commands, which is the kind that use 'women' or 'girls'? Why don't you title it: separating adults' commands from children's! That would be totally gender-neutral! Regards!Unknownhttps://www.blogger.com/profile/05510127384644056385noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-15008013627441764312013-03-07T12:15:14.385+02:002013-03-07T12:15:14.385+02:00This is very uncommon, though, and makes the code ...This is very uncommon, though, and makes the code less readable.<br /><a href="http://www.southfloridavendingmachines.com/" rel="nofollow">South Florida Vending Machines Services</a>South Florida Vending Machines Serviceshttps://www.blogger.com/profile/09002328086845632091noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-54329728424860394412012-06-11T13:27:33.542+03:002012-06-11T13:27:33.542+03:00Hey Stataman,
This tutorial has been very useful,...Hey Stataman,<br /><br />This tutorial has been very useful, thank you so much for sharing.<br /><br />I have a quesiton, My data set is panel data on daily basis. I would like to run daily regression for each quarter and extract the estimates to have a quarterly time series of estimates (coef, tstat, rsquare and stand error). but my problem is Not all my dependent var or id available in all quarters, some of them are present at the beginning of sample and some only at the end.<br /><br />when I run my loop to run the regression it gives me the following error message:<br /><br />no observations found or no variable defined.<br /><br />how can I solve this problem?<br /><br />Best, <br /><br />Mahmoudmahmoud aymohttps://www.blogger.com/profile/10986889959304870935noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-78351384341154578862011-10-27T06:50:28.229+02:002011-10-27T06:50:28.229+02:00HELP needed
My data is the exicison of skin cancer...HELP needed<br />My data is the exicison of skin cancers from patients over 4 1/2 year period. Many people have multiple events (max is 120) and I want to count number of lesions if the cancers are <=90days apart. If they are then I want to also delete that record. I have started working through the permutations but if anyone can suggest how i can loop this?<br />doservice = date lesion taken out<br />numsyn1 = number of skin lesions taken out on that day.<br />For example if person had 2 events, I would look at difference between 1-2<br />if person had 3 events, I would first look at 1-3, then 1-2 then 2-3. <br />if person had 4 events, I would look at 1-4, then 1-3, then 1-2 then 2-4, then 2-3 then 3-4<br /> <br />(starting to get combinations formation occuring)<br /> <br />Please see below.<br />//1-4 bysort id (event) : replace numsyn1 = numsyn1 + numsyn1[_n+3] if (doservice[_n+3] - doservice[1]<=90) drop if event==4 & (doservice - doservice[_n-3]<=90)//for 3 events<br />//1-3 bysort id (event) : replace numsyn1 = numsyn1 + numsyn1[_n+2] if (doservice[_n+2] - doservice[1]<=90) drop if event==3 & (doservice - doservice[_n-2]<=90)//for 2 events<br />//1-2 bysort id (event) : replace numsyn1 = numsyn1 + numsyn1[_n+1] if (doservice[_n+1] - doservice[1]<=90) drop if event==2 & (doservice - doservice[_n-1]<=90)<br />//SECOND LOOP///for 4 events<br />//2-4 bysort id (event) : replace numsyn1 = numsyn1 + numsyn1[_n+2] if event==2 & (doservice[_n+2] - doservice<=90) drop if event==4 & (doservice - doservice[_n-2]<=90)<br />//for 3 events<br />//2-3 bysort id (event) : replace numsyn1 = numsyn1 + numsyn1[_n+1] if event==2 & (doservice[_n+1] - doservice<=90) drop if event==3 & (doservice - doservice[_n-1]<=90)<br /> <br />//THIRD LOOP///for 4 events<br />//3-4 bysort id (event) : replace numsyn1 = numsyn1 + numsyn1[_n+1] if event==3 & (doservice[_n+1] - doservice[1]<=90) drop if event==4 & (doservice - doservice[_n-1]<=90)<br /> id doservice survday failure numsyn1 event repeat newstopdate maxevent <br />9 20-Feb-08 41 1 1 1 1 30-Jun-08 2 <br />9 1-Apr-08 90 0 1 2 0 30-Jun-08 2 <br />14 1-Jun-04 14 1 1 1 1 30-Jun-08 2 <br />14 15-Jun-04 1476 0 1 2 0 30-Jun-08 2 <br />15 6-Jun-06 268 1 1 1 0 1-Mar-07 3 <br />15 1-Mar-07 257 1 1 2 0 13-Nov-07 3 <br />15 13-Nov-07 230 0 1 3 0 30-Jun-08 3 <br />16 20-Jan-04 497 1 1 1 0 31-May-05 4 <br />16 31-May-05 7 1 1 2 1 16-Jun-05 4 <br />16 7-Jun-05 9 1 1 3 1 30-Jun-08 4 <br />16 16-Jun-05 1110 0 1 4 0 30-Jun-08 4 <br /><br />Regards<br />NiyatiNiyati Sharmahttps://www.blogger.com/profile/15115913872918864493noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-62830551153456313802011-03-17T21:44:34.080+02:002011-03-17T21:44:34.080+02:00hi,
blog very useful for someone like me (scared ...hi,<br /><br />blog very useful for someone like me (scared of stata and just want to get done with it soon...)<br /><br />q: i need to create an indicator variable such that there are ten 1s only (out of 19 observations). this is going to be part of a loop, where i'll need stata to come up with different combinations of 1 and 0 distributions... and i'll need it to do other stuff with this variable... but i'll get my doubts clarified one at a time...<br /><br />thanks<br />sheetalsheetalhttps://www.blogger.com/profile/13026148659740730086noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-11481359005223198572011-03-04T00:26:02.245+02:002011-03-04T00:26:02.245+02:00Thank you, very helpful!Thank you, very helpful!rec.bicyclehttps://www.blogger.com/profile/08343355365992892780noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-33031941148038979702010-06-23T09:19:32.051+03:002010-06-23T09:19:32.051+03:00Thank you very much!Thank you very much!Longhttps://www.blogger.com/profile/13265830019277964567noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-74124833328743521662010-06-22T19:54:48.202+03:002010-06-22T19:54:48.202+03:00Hi,
You may find additional automation tips and t...Hi,<br /><br />You may find additional automation tips and tricks in my personal webpage, for a short course that I co-taught. Look for the third lecture notes file of Stata:<br /><br />http://www.stanford.edu/~roymill/cgi-bin/computing/material.phpstatamanhttps://www.blogger.com/profile/13749462261829425392noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-11078547824467203392010-06-22T05:19:17.097+03:002010-06-22T05:19:17.097+03:00Hi Stataman,
Could you please guide me how to exp...Hi Stataman,<br /><br />Could you please guide me how to export the results from Stata into Excel file format.<br /><br />For example, after I run the "summarize" command and I want to save the result into a Excel file. Please help !!!!!!!!!!!!!!!!!!Longhttps://www.blogger.com/profile/13265830019277964567noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-20080117744764297732010-06-07T05:16:16.122+03:002010-06-07T05:16:16.122+03:00Thank you very muchThank you very muchLonghttps://www.blogger.com/profile/13265830019277964567noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-47926450964873622682010-06-07T04:09:26.810+03:002010-06-07T04:09:26.810+03:00Hi,
You are not using the back-tick for your loca...Hi,<br /><br />You are not using the back-tick for your local when you call it, you are using the regular tick. The back-tick on my keyboard is in the top-left corner of the main set of keys (left to the 1 key).<br />do:<br />di `rsqv'<br />and not:<br />di 'rsgv'statamanhttps://www.blogger.com/profile/13749462261829425392noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-48297340299568998822010-06-07T03:49:19.293+03:002010-06-07T03:49:19.293+03:00Hi Stataman
I have problem with local command. I ...Hi Stataman<br /><br />I have problem with local command. I use Stata 11/MP.<br />I have a dofile like this:<br />sysuse auto, clear<br />regress mpg weight<br />local rsqf e(r2)<br />local rsqv = e(r2)<br />di 'rsqf' // this has the current R-squared<br />di 'rsqv' // as does this<br />regress mpg weight foreign<br />di 'rsqf' // the formula has the new R-squared<br />di 'rsqv' // this guy has the old one<br /><br />And the result is here:<br /> sysuse auto, clear<br />(1978 Automobile Data)<br /><br />. regress mpg weight<br /><br /> Source | SS df MS Number of obs = 74<br />-------------+------------------------------ F( 1, 72) = 134.62<br /> Model | 1591.9902 1 1591.9902 Prob > F = 0.0000<br /> Residual | 851.469256 72 11.8259619 R-squared = 0.6515<br />-------------+------------------------------ Adj R-squared = 0.6467<br /> Total | 2443.45946 73 33.4720474 Root MSE = 3.4389<br /><br />------------------------------------------------------------------------------<br /> mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval]<br />-------------+----------------------------------------------------------------<br /> weight | -.0060087 .0005179 -11.60 0.000 -.0070411 -.0049763<br /> _cons | 39.44028 1.614003 24.44 0.000 36.22283 42.65774<br />------------------------------------------------------------------------------<br /><br />. local rsqf e(r2)<br /><br />. local rsqv = e(r2)<br /><br />. di 'rsqf' // this has the current R-squared<br />'rsqf' invalid name<br />r(198);<br /><br />end of do-file<br /><br />r(198);<br /><br />Why it says: 'rsqf' invalid name<br /><br />Please help!Longhttps://www.blogger.com/profile/13265830019277964567noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-26828520187964773592009-10-30T19:07:09.219+02:002009-10-30T19:07:09.219+02:00This comment has been removed by the author.statamanhttps://www.blogger.com/profile/13749462261829425392noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-381369989665724482009-10-30T15:52:02.413+02:002009-10-30T15:52:02.413+02:00thank you for this blog. i have often found it hel...thank you for this blog. i have often found it helpful.<br /><br />i just want to say that i'm disappointed by the title of this post (and some of its context). there are many skilled female stata users out there, including myself. saying that automating the code separates the "men from the boys" excludes women. why not just separate the "great coders from the good ones"?<br /><br />i know this is a touchy issue, and i appreciate your thoughtfulness on the topic.thought mongerhttps://www.blogger.com/profile/01324158941272911354noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-44289556228377934732009-10-16T06:22:38.774+02:002009-10-16T06:22:38.774+02:00Actually, yes. I prepared some handouts for a shor...Actually, yes. I prepared some handouts for a short Stata course I gave. Will post a link in the main site soon.statamanhttps://www.blogger.com/profile/13749462261829425392noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-90304286424428262182009-10-16T06:15:14.732+02:002009-10-16T06:15:14.732+02:00Your tutorial is excellent! I come from a programm...Your tutorial is excellent! I come from a programming background and this has brought me up to speed. One thing I am sorely lacking in understanding is how to build tables. Did you ever get around to writing that next step in the tutorial? If not, any example code you could send me? Thanks again.Jonathanhttps://www.blogger.com/profile/01624799131393081540noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-11982326235286143282009-08-27T11:12:43.864+03:002009-08-27T11:12:43.864+03:00Hi Stataman,
thanks a lot for your sooooo usefull...Hi Stataman,<br /><br />thanks a lot for your sooooo usefull contribution. It is very clear and interesting and I am deadly looking forward to reading the next steps ! Using the output results and making nice tables might be sometimes pretty tricky, particularly with ecommands...<br />hope you will find some time !<br />cheers<br /><br />Marie Gmarthehttps://www.blogger.com/profile/13224083183016086041noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-72437763622819120692009-08-06T19:11:20.895+03:002009-08-06T19:11:20.895+03:00Hi Michael,
Thanks! I'm glad you found this h...Hi Michael,<br /><br />Thanks! I'm glad you found this helpful.<br /><br />Roystatamanhttps://www.blogger.com/profile/13749462261829425392noreply@blogger.comtag:blogger.com,1999:blog-5290984163937382875.post-40336401614105548282009-08-02T05:02:35.620+03:002009-08-02T05:02:35.620+03:00Stataman: I want to post a follow up to my message...Stataman: I want to post a follow up to my message of a few weeks ago. After reading your tutorial on automation, I've been thinking how I might incorporate those ideas into my own work with Stata. I managed to recognize a couple of opportunities to use automation. But I needed to learn more about the syntax, application, etc. I found Larry Hamilton's text, "Statistics with Stata" in chapter 14 a very good follow up to your excellent primer. Reading your material is much easier than any text I think and it gave me a start in the new area (for me) of automation. Your comments about automation syntax being a language is spot on. It comes along with practice. Thanks.<br /><br />I'll be checking back to your website to see if you manage to write the final two sections. We appreciate your time in putting this together. It's made me more proficient for my doctorate research.Michaelhttps://www.blogger.com/profile/13277568790680242249noreply@blogger.com