Learn R Programming

matie (version 1.0)

shpd: Generates Sample HyperPlane Data.

Description

This function generates a sample hyperplane data set.

Usage

shpd(n,m=2,Rsq=0.7,Ri=0)

Arguments

Value

Returns a n x m data set

Details

Scatters data around the hyperplane: Vm = sum(V1...Vm-1) + noise where noise is adjusted so that the final dataset has coefficient of determination equal to Rsq. Variables V1..Vm-1 are assumed to be independent but the user can make them dependent on each other by setting the Vi parameter away from zero.

References

coming soon

See Also

ma

Examples

Run this code
d <- shpd(500,3,Rsq=0.8,Ri=0.01)
    ma(d)$A
    ma(d,partition=list(1,2))$A
    ma(d,partition=list(3,1))$A
    ma(d,partition=list(3,2))$A
    ma(d,partition=list(3,c(1,2)))$A
    cor(d)^2
    # if m=3 and if you have rgl 
    # you can view the data set in 3D 
    # library("rgl")  
    # plot3d(d)

Run the code above in your browser using DataLab