make.x.s {BayesGWQS}R Documentation

Forms component group ID vector of X

Description

This function returns a vector which lets WQS.fit know the size and order of groups in X

Usage

make.x.s(df, num.groups, groups)

Arguments

df

A dataframe containing named component variables

num.groups

An integer representing the number of component groups desired

groups

A list, each item in the list being a string vector of variable names for one component group

Value

A vector of integers, each integer relating how many columns are in each group

Examples

data("simdata")
group_list <- list(c("pcb_118", "pcb_138", "pcb_153", "pcb_180", "pcb_192"),
                   c("as", "cu", "pb", "sn"),
                   c("carbaryl", "propoxur", "methoxychlor", "diazinon", "chlorpyrifos"))
x.s <- make.x.s(simdata, 3, group_list)
x.s

[Package BayesGWQS version 0.1.1 Index]