shpd: Generates sample hyperplane data.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function generates a sample hyperplane data set.

Usage

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

Arguments

n

number of sample points to generate

m

a hyperplane of dimension m-1 will be generated in m space

Rsq

the desired coefficient of determination for the hyperplane, indicates how far data points will vary from the plane.

Ri

correlation coefficient for "independent"" variables within the hyperplane

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.

Value

Returns a n x m data set

Author(s)

Ben Murrell, Dan Murrell & Hugh Murrell.

References

Discovering general multidimensional associations, http://arxiv.org/abs/1303.1828

See Also

ma

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
    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)

matie documentation built on May 2, 2019, 3:52 a.m.