Learn R Programming

GLDEX (version 2.0.0.9.3)

fun.disc.estimation: Estimates the mean and variance after cutting up a vector of variable into evenly spaced categories.

Description

This function supplements fun.nclass.e and it is not intended to be used by the users directly.

Usage

fun.disc.estimation(x, nint)

Value

Two numerical values, the first being the mean and the second being the variance.

Arguments

x

A vector of observations.

nint

Number of intervals to cut the vectors into.

Author

Steve Su

Details

The function cuts the vector into evenly spaced categories and estimate the mean and variance of the actual data based on the categorisation.

See Also

fun.nclass.e

Examples

Run this code
# \donttest{
## Cut up a randomly normally distributed observations into 5 evenly spaced 
## categories and estimate the mean and variance based on this cateogorisation.
junk<-rnorm(1000,3,2)
fun.disc.estimation(junk,5)
# }

Run the code above in your browser using DataLab