| To: | duo wan <duo_wan@yahoo.com> |
|---|---|
| Subject: | Re: weighted average method for rates |
| From: | "David L Lorenz" <lorenz@usgs.gov> |
| Date: | Tue, 16 Nov 2004 07:43:13 -0600 |
| Cc: | s-news@lists.biostat.wustl.edu, s-news-owner@lists.biostat.wustl.edu |
Duo wan,
The hmisc library has function for computing weighted statistics. They
all begin with wtd.
Dave
duo wan
<duo_wan@yahoo.com> To:
s-news@lists.biostat.wustl.edu
Sent by: cc:
s-news-owner@lists.biosta Subject: [S] weighted
average method for rates
t.wustl.edu
11/15/2004 11:43 AM
Dear S-users:
I am trying to combine the rates using common weighted average methods. is
anyone who knows how to use S to do it or assist me with formulaes?
thanks!!!
duowan
num_im=num of improved patients;
num_pat=number of patients.
rate=num_im/num_pat
Obs num_im num_pat RATE
1 16.0 17 0.94118
2 10.0 12 0.83333
3 4.0 8 0.50000
4 43.0 58 0.74138
5 9.5 10 0.95000
6 25.0 42 0.59524
7 13.0 14 0.92857
8 11.5 12 0.95833
9 22.0 41 0.53659
10 4.0 5 0.80000
11 5.0 6 0.83333
12 18.0 23 0.78261
13 58.0 68 0.85294
14 6.0 10 0.60000
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | testing of significance of factor variable when using gee, Karin |
|---|---|
| Next by Date: | Problems with predict() within rpart package under S-Plus 6.2, Peter.Caley |
| Previous by Thread: | weighted average method for rates, duo wan |
| Next by Thread: | boxPlot with guiPlot, Tiago R Magalhaes |
| Indexes: | [Date] [Thread] [Top] [All Lists] |