[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: Submitting a command in a couples of pieces

From   Jeph Herrin <>
Subject   Re: st: RE: Submitting a command in a couples of pieces
Date   Thu, 29 Oct 2009 14:13:38 -0400

Activity data can keep one busy. You may be interested
in something like this for sorting out the kids from the


Adrian Sayers wrote:
Many thanks Martin and Nick...

Martin: i have it working like a charm, thanks for the direction

Nick: I agree automating the situation would be the best idea, unfortunately this is data collected via an activity monitor. The monitor starts automatically the morning after receipt at 5:00 am and then continues measuring until the battery runs out. The problem is the participants dont always put the monitors on or take them off when they should.

Its quite easy to eye ball the data and see when the monitor has been worn, but unfortunately we seem to measure the activity of the postman bringing the monitor back to study. Its easy to eyeball the difference in patterns, but because the postman is very active they accumulate a lot of activity in short period of time, which looks quite like the activity of a child over a day.

Whilst this may be a thankless task it should only take a day or two.


--On 29 October 2009 16:04 +0000 Nick Cox <> wrote:

As Martin has explained, it is certainly possible. The reason most
people don't know about it is probably that in most cases it is a very
bad idea. That need not apply to your situation, but if I had 3000 odd
data files I would even more inclined than usual to automate everything.


Adrian Sayers

I was wondering if you might be able to help me?

I am trying to submit a command in a number of stages.

Basically i want stata to ask me a question, then i want to key the
response, and then i want stata to run a program. It sounds a little
pointless but i am trying read in 3000 odd data files plot them and then

trim the file to the relevant section.

di "What is the first day of data collection?"
Type 3
di "Day of first data collection = 3"
drop if day<3

I am wondering if this is possible.

i am using stata version 9.2

*   For searches and help try:

Adrian Sayers
Medical Statistician
University of Bristol
Dept. of Rheumatology
Dept of Social Medicine,
Oakfield House,
Oakfield Grove,
Bristol BS8 2BN

Temp No. 0117 3310054 (10054 internally)
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index