Skip to contents

[Experimental]

This function finds a number of starting knot locations for different factor levels and is used for creating an interaction term.

Usage

selectFctrKnots(data, nk, s.eed = 1)

Arguments

data

Coordinates of the data locations in columns 1 and 2 and the associated factor level in the third.

nk

The number of knots to be selected for each factor level. This may be a single number (for all factor levels) or a vector of numbers to allow a different number of knots to be selected for each factor level.

s.eed

default = 1. Set the seed for the selection to ensure reproducibility.

Details

The function returns a data frame with three columns; x and y locations for candidate knots and associated factor level.

Examples

# load data
data(nysted.analysisdata)

myknots <- selectFctrKnots(nysted.analysisdata[,c("x.pos", "y.pos", "impact")], 
                           nk=150)