Installing Stata 12 (with GUI) on Ubuntu 12.10

by on Mar.08, 2013, under Instructional, Technology

stata12I like Stata well enough but it requires a little work to get the GTK based gui for Stata 12 working under Ubuntu (and probably other Debian based distros as well).  I had working fine under 11.04 and 12.04 on my laptop but wanted to drop it on my shiny new and fast desktop with 12.10 on it.

Previously after installing Stata and setting up the licenses you had to link some libraries to get the gui to work properly.  I based my install on this concise post from Eduard Grebe.

~$ sudo mkdir /usr/local/stata
~$ cd /usr/local/stata
~$ sudo /install

Follow the prompts then run:

~$ sudo ./stinit

and enter in your license information.

At this point you should be able to run the command line interface for stata (or whatever version of stata you have a license for  like stata-mp – note stata is the stata ic version) with a

~$ stata
___ ____ ____ ____ ____ (R)
/__ / ____/ / ____/
___/ / /___/ / /___/ 12.0 Copyright 1985-2011 StataCorp LP
Statistics/Data Analysis StataCorp
4905 Lakeway Drive
College Station, Texas 77845 USA
979-696-4601 (fax)

30-user Stata network perpetual license:
Serial number: 0000000000000
Licensed to: Blah Blah

1. Command line editing enabled

Weee! Lets do some math!


enter exit to exit stata

To get the gui to work you need to create a link for the older dependencies that the stata gui relies on since they are no longer in the libraries:

~$ sudo apt-get install libgtksourceview2.0-0 libgnomeprint2.2-0
~$ sudo ln -s /usr/lib/ /usr/lib/

You can use xstata (or whatever is appropriate for your license) to start the gui of xstata.
For me it failed with:

“GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported”

After doing a:

~$ sudo ldd /usr/local/stata/xstata

I found that it was trying to use a a in /usr/lib/x86_64-linux-gnu instead of the link I set up in /usr/lib. Somehow (probably me at some point) a link in of to existed. Once removed the stata gui started up fine.

You can create a menu entry by looking here. I use cinnamon so I just right clicked on the menu icon and added an application entry that way.

Create Launcher_008

This reminds me to sit down and finally learn R!

3 Comments :, , more...

Unix Basics Workshop

by on Jul.09, 2012, under Instructional, Technology

I did an informal workshop for clinicians and informatics students on the basics of using Unix (in this case Linux).  It focuses on the basics of the command line and on using the venerable editor vi.  No scripting or even shell environment manipulation – these folks had never seen a shell prompt before.  Although geared to connecting to the U of U’s Center for High Performance Computing, it is certainly applicable to any Unix, and thus may be helpful for you.  The most useful part is the appendix, which contains several cheat sheets collected from around the Internet.  It may also be useful if you are doing some teaching training yourself as it has some simple cases to work through that you could adapt to your environment.

Feel free to use and adapt:

2012 UNIX basics workshop

Note: The tux graphics are from the excellent collection at the Tux Factory





Leave a Comment :, more...

Laptop as a battery backup

by on Jul.09, 2012, under Technology

My smart phone, with its flight tracking, taxi apps, and airport directories has become more important to me when travelling than my laptop. On a recent trip I found I needed a charge while in a layover in O’hare but could not locate a free outlet in the crowded airport.  I decided to sacrifice my laptop battery to charge my more important smart phone but in my aging laptop battery only provided about an hour of operating time for my laptop.

In order to extend its ability to charge my phone and not just idle its charge on my OS I started the computer and immediately entered the bios setup.  I let the computer stay in this state while it charged my phone (which of course takes longer via USB) and the laptop battery lasted much longer than an hour during the charge as it did not have to do anything for the laptop (disk reads, background OS tasks, etc).

Its not rocket science but maybe this tip will help someone else desperate for a phone charge.


Leave a Comment more...

Atlas.ti collaboration

by on Jun.18, 2012, under Health IT, Instructional


Note: even though this is the 7.0 icon, this tutorial was in 6.2

One thing that surprised me about Clinical Informatics research is that the best and most impactful work has a cognitive psychology / industrial engineering / human factors part to it.  This makes sense as informatics is much more than computers+medicine but understanding how to use computers to reduce the cognitive burden of practitioners so they can focus on what they are best at: diagnosing and treating disease. Many examples exist where computer systems or devices were implemented without really understanding what the system was trying to solve, causing frustration and negative attitudes towards future computer based implementations in the clinical setting.

So in an attempt to do good research, I performed some cognitive task analysis interviews in preparation to my electronic referral overhaul – a task very foreign to my physical science/ engineering background (but not to different from a clinical interview).  I soon found that in order to do qualitative data analysis and code and look for patterns in my interviewees responses I need a QDA coding suite.  I found one of the most popular is atlas.ti.

After learning about hermeneutic units and the like I was ready to go. However, I quickly found the defaults for atlas.ti did not encourage collaboration. I also found the help on this subject obtuse at best.  So the following is my setup for working with others on a coding project – I put it here so we can remember and in case someone else needs some help.

Atlas’s save file, a hermeneutic unit (HU), is a collection of your codes, annotations, memos, etc. that are referenced to “primary (P) docs”.  The latter can be word docs, PDFs, video, audio, map coordinates – Atlas handles quite a few formats.  Atlas can be pretty temperamental about its docs though – it wants to find them in a specific spot and does not want them to change at all.  The latter becomes a problem when sharing among various machines – for example you and your co-investigators probably do not have the same login but your path’s will include that.  One thing you can do is put your reference docs in a directory off the root on everyone’s machines like C:\HU docs\ or something. However, For my project it was further complicated by some sensitive information in the transcripts – so they had to remain on an encrypted partition on my drive and the absolute paths could not be easy set up the same on each computer.

I set up myself and co-investigator each with a copy of the transcripts from the interviews (in word doc format) and write protected them in an encrypted image (truecrypt for those interested).  For reasons beyond this explanation the paths of these encrypted folders were different on each computer.

I looked for info on setting up relative paths but could not find it in the help docs. It took me a bit of figuring out because Atlas refers to relative paths as “special” paths and only lets you set one at a time. Its the TBPATH variable.  Before we go there we need to setup a few other things that make life easier.

(continue reading…)

Leave a Comment :, , more...

The challenge of adopting Health Information Exchange Systems in the US

by on Oct.24, 2011, under Health IT, News

The adoption of Health information exchanges (HIE) is hobbled by the difficulty of creating a viable business model in the the fragmented landscape of health care in the United States. This fettering is apparent in the adoption of informatics technologies such as telelhealth. Adoption of telehealth results in a costs savings due to decreased transport, better patient follow up, and efficiently distributing specialty care (1,2). A recent study demonstrated that a nationwide adoption of telelhealth in emergency rooms, prisons, nursing home facilities and physician offices would save the health care system over 4.3 billion dollars(1). A similar 2005 study showed adoption of an standardize nationwide HIE would results in savings of 77.8 billion per year once fully implemented (3). Unfortunately in the fragmented landscape of US health care there is no single health care entity. Thus, the difficulty in adopting technologies such as telehealth or HIE lies in a health system with multiple actors each with different interests and agendas all trying to minimize costs and often times increase profitability so that the initial investment in such technologies by a single actor becomes a difficult pill to swallow (4).

Private sector telelhealth companies such as American Well have flourished because their business model relies on a partnership with private insurance companies (5). This allows for the adoption of telelhealth technologies without a cost burden to patients or physicians. Wright et. al. while discussing HIE adoption state that “finding a sustainable business model is a key challenge for existing and proposed HIOs some of which depend on subscription fees from physicians” (6) . This places the burden on a single actor in the system. In this study physicians became less enamored with the adoption of an HIE when a monthly cost of $150 was required for their participation. Following the example of companies like American Well, HIE adoption will move forward through partnerships: creating a business model where private companies, hospital systems, and insurance companies share the cost burden of implementing the system since they all will benefit.

(continue reading…)

Leave a Comment more...

HealthyIT revived

by on Oct.24, 2011, under Health IT, News

 I thought I would revive this old domain now that I am officially working in the informatics field (as opposed to being a medical student with an interest in informatics).  As I progress through my new career I hope to put some helpful tidbits here for my reference and perhaps as a helpful reference to others.  My research interests tend toward more applied health care informatics, but I am also a heavy technology user, so I will likely try to put some of my hacks here as well.  Cheers!

Leave a Comment more...

Woof: a cool python script for quick file transfers

by on Feb.15, 2011, under Instructional, Technology

woof woofI stumbled across a python script woof, or Web Offer One File, the other day in the typical serendipity of the web: looking for something completely unrelated.  In short, running the script on a file will start a simple webserver and produce an address you can pass on to a friend in place of emailing it or dropboxing it.    That friend on your local network can drop that address in a browser or use a command like wget and grab the file; the server shuts down and everyone is happy. It also will take a directory, zip it up and send that along too.

I use this with my wife sometimes when we are on our home network, working together and I’m to lazy to drop a file on our shared server.  It’s a bit more handy when out and about at a coffee shop or library and we need to quickly share something larger than would be reasonable with bluetooth.  It works well with all the unixes I tried it on, including my maemo device (n800).  Since the Maemo 4 does telephony does not support file transfers I can just use woof to do a transfer while chatting locally with bonjour.

Obviously there are a million and one ways of moving files and directories about, but I like the bare simplicity and utilitiy of this on a local network.

Update 10/24/2010:

Yes I use dropbox and similar services to share stuff on my local network.  Its even lazier than the woof script but really what was holding me back was my poor old n800 running maemo with no easy way to connect with these syncing services.  If the files are sensitive and I really do not want them to go out to a third party without my own encryption on them – then I do one of two things:

  • use giver – works well if others are using linux and is an easy install via repositories.
  • Use lysncd to sync stuff to my home server.  This location is auto shared with other family members on the home network.  This works with my various linux devices as well (which do not have dropbox clients available).
Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...


All entries, chronologically...