Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: plot
See also: plothist plotbox plotdot

Quantlet: plothistwtd
Description: Plots a weighted histogram of x

Usage: plothistwtd(inX, inWeights {,inTicks})
Input:
inX n x 1 Vector of continuous data.
inWeights n x 1 Vector of weights.
inTicks m x 1 Vector. Specifying the (m-1) intervalls for the histogram.

Note:

Example:
library("plot")
Mean = #(1, 1.1, 1.6, 1.2, 2.5, 2.2, 2.9, 3.2, 4.1)
Fraction = #(0.5, 0.7, 3, 1.1, 1.2, 4.0, 1.3, 2.8, 0.9)
plothist(Mean, 1:5)
plothistwtd(Mean, Fraction, 1:5)

Result:
You see two histograms - one standard histogram and one
weighted histogram.
In this example means for different subgroups of a dataset
have been computed. In the standard histogram all means
have the same weight, disregarding the size of the underlying
sample.
In the weighted histogram the sample size (here as fraction
of the whole dataset) is provided.
Note the different shape (and hence interpretation!) of the
two histograms.



Author: S. Lauer, 19990305
(C) MD*TECH Method and Data Technologies, 05.02.2006