pcapdir {saebnocov}R Documentation

Weighted Sample Mean and Variance

Description

Weighted Sample Mean and Variance

Usage

pcapdir(data)

Arguments

data

the data must contain two or three columns : code, y, and weight data if exist.

Value

This function returns a list with following objects :

direst

an information about direct estimatior in each area

pcap

pcap (the weighted sample mean), vardir (the weighted sample variance),yt (the total number of the "success" category from each area), and nt (the total number of sample from each area)

Examples

## load dataset with no weight value
data(dataEB)
pcapdir(dataEB[,-c(3)])

##load dataset with weight value
data(dataEB)
pcapdir(dataEB)


[Package saebnocov version 0.1.0 Index]