Learn R Programming

PathSelectMP (version 1.1)

CreateInitializeMatrix: Create Possible Path Matrix

Description

creates a dataframe with 1's and 0s' where a 1 represents inclusion in the path and 0 represents exlusion

Usage

CreateInitializeMatrix(InitialData, WhichCat, empty = FALSE)

Arguments

InitialData

the dataframe with the initial data

WhichCat

a vector of 0's and 1's length of number of columns of InitialData where 1 is a categorical variable and 0 is a continuous variable

empty

if empty is TRUE then a dataframe of all 0's is returned to allow user to individually assign 1's for path inclusion more easily

Value

returns matrix required by Initialize for all initial paths to run the default is an upper triangular matrix. This is a square matrix and names of rows is the same as the names of columns

Details

the rows represent dependent variables in the path and the columns represent independent variables in the paths with a 1 representing in M Plus terminology row variable ON column variable

References

M Plus

Examples

Run this code
# NOT RUN {
InitD=Simulate()
I=CreateInitializeMatrix(InitD,WhichCat=c(rep(1,ncol(InitD)-1),0))

# }

Run the code above in your browser using DataLab