Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: on counting and fractions in stata

From   "" <>
To   "" <>
Subject   st: on counting and fractions in stata
Date   Thu, 27 Oct 2011 12:39:28 +0100 (BST)

Dear all,

I face the following problem in Stata:

I have a series of daily observations on a given variable and I also have one estimate of this variable that serves as a threshold. 

I would like to estimate how many times this threshold is exceeded by comparing the value of this estimate with the available data on daily observations. Is it possible to estimate fractions in Stata in this particular way? 

Below is a simple example: 

series   estimate: 3.1

Given this data,I would like to get the following estimates (comments in brackets):

count:1 (threshold is exceeded only once)
fraction: 1/4=0.25 (one out of 4 cases)

Many thanks in advance.


*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index