s-news
[Top] [All Lists]

Weighted density estimate (2)

To: s-news@wubios.wustl.edu
Subject: Weighted density estimate (2)
From: P.J.Wells@open.ac.uk
Date: Thu, 21 Jun 2001 12:25:30 +0100
Pending some further responses to my original query about this (appended
below for convenience), can someone suggest ways of implementing the
following alternative strategy?

Recall that the problem is, in effect, to weight the individuals on which I
have data (firms) in  proportion to one of the variables describing them
(capital stock).

The other approach which has occurred to me would be to create extra
individuals in appropriate numbers: i.e. for each firm F with profit rate R
and capital K, create another K-1 individuals with profit rate R.

Since there are theoretical reasons to think that the capital-level
distribution of R is a gamma distribution, this would have the advantage,
for me, of making it easy to estimate the parameters using the code provided
by Xao Ping on 18/6/01.



Julian Wells

OU Business School
The Open University
Walton Hall
Milton Keynes
MK7 6AA
United Kingdom
+44 1908 654658



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I have data on firms' profits and their capital; hence I can compute a
profit rate for each firm.

It's easy to get S-Plus to produce a density histogram of the distribution
of the profit rate over the sample of *firms*.

But what my project needs is a density estimate of the profit rate
distribution over the population of the *capital* employed by these firms.

Thus, if k(i) is the capital of the i-th firm, and p(i) its profit, then
R(i) = p(i)/ k(i).

Also, for units of capital j = 1, 2, 3, ..., 

p(a<R(j)<b)= sum(k(i))/k(T)

where k(i) is the capital of each firm for which a<R(j)<b.

In words, the probability that any randomly chosen $ of capital achieves a
rate of profit in the interval a<R(j)<b is given by the sum of the capital
employed by firms whose profit rates lie in that interval, divided by the
total capital employed by the sample firms.

Question: how do I get S-Plus to produce this?

On the face of it, it looks as if barplot would do this if

(a) the height argument consisted of a matrix where the columns represent
each interval and the rows contain the capital data for the firms falling in
each interval (and presumably zeros or NAs in the appropriate rows for
columns either side of the (firm-level) mode).

(b) the width argument is a vector of the interval boundaries.

But if so, how do I assemble the height matrix?

On the other hand, if I am barking up the wrong tree, how else can I achieve
this?
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

<Prev in Thread] Current Thread [Next in Thread>
  • Weighted density estimate (2), P . J . Wells <=