Skip to content

HMISC package: wtd.table()

6 messages · Norbert NEUWIRTH, Frank E Harrell Jr, Dieter Menne +1 more

#
Hi useRs & developeRs,

I got stuck within a function of the Hmisc package. Sounds easy, hope it is:

I got 2 items (FamTyp.kurz, HGEW) of same length, no missings.
[1] 14883
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  10.00   20.00   21.00   21.66   23.00   31.00
[1] 14883
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  104.5   409.6   489.4   549.8   623.3  3880.0   

Now I simply want to compute a table of unweighted and weighted values. But, ...  the weights do not seem to be accepted ????
[1] "unweighted ...."
FamTyp.kurz
  10      11    20       21     22      23     30      31 
1755  683 3322 1683 2428 1440 1748 1824
[1] "weighted   ...."
Error in wtd.table(FamTyp.kurz, weigths = HGEW, normwt = FALSE, na.rm = TRUE) : 
  unused arguments (weigths = c(495.55949, 495.55949, 678.16378, 678.16378,  .....
  
  
any ideas ???  

thanx in advance,
    Norbert
#
oops, that really was easy:

(wtd.table(FamTyp.kurz,HGEW,normwt=FALSE,na.rm=TRUE))  instead of 
(wtd.table(FamTyp.kurz,weigths=HGEW,normwt=FALSE,na.rm=TRUE))

sorry for that question ...

Am 26.01.2009, 10:30 Uhr, schrieb Norbert NEUWIRTH <norbert.s.neuwirth at univie.ac.at>:

  
    
#
Norbert NEUWIRTH wrote:
That is one solution.  The other is to spell 'weights' correctly :-)
Frank

  
    
#
Frank E Harrell Jr <f.harrell <at> vanderbilt.edu> writes:
Have pity with us German speakers. It was such a paing to learn  
"th" that we cannot resist to apply it whenever pothible.

Dieter
#
Dieter Menne wrote:
Good point Dieter.  I'm still learning english myself.

Frank
#
Frank E Harrell Jr wrote:
Including capitalization rules?