Learn R Programming

matie (version 1.0)

pd: Plot Density (after an ma calculation).

Description

Optimal kernel widths output by ma are employed to recompute the weighted joint distribution for two variables in a data set, and a contour plot for this distribution is drawn.

Usage

pd(d,iv=1,jv=2)

Arguments

Value

An n x n distribution of weighted likelihoods is returned.

Details

A data set of two variables is extracted from the user's data set and a full distribution is calculated using weighted marginal and joint likelihoods. The optimal kernel sizes and weighting are first computed via a call to ma.

References

coming soon

See Also

ma

Examples

Run this code
f <- function(x,name="Sinusoidal",def="y = 1 + sin(x)"){
      return(1 + sin(x))
    }
    d <- sbd(f,min=-2*pi,max=2*pi,n=1000,Rsq=0.9)
    ma(d)$A
    dist <- pd(d)

Run the code above in your browser using DataLab