find_B {mars}R Documentation

Estimate regression coefficients

Description

Estimate regression coefficients

Usage

find_B(model_input, R)

Arguments

model_input

Model input as a character string. Multiple models need to be on their own line. Model syntax uses lavann like syntax, see details for more details about this syntax.

R

A correlation matrix, most likely this will be the average correlation matrix outputted from the metafor package.

Details

Coming soon.

The output will be the same length as the number of regression equations specified in the model_input argument.

Value

A list of parameter estimates

Examples

Br <-  matrix(c(1.00000000, -0.09773331, -0.1755029,  0.3186775,
-0.09773331,  1.00000000,  0.5271873, -0.4175596,
-0.17550292,  0.5271872,  1.0000000, -0.4006848,
0.31867753, -0.41755963, -0.4006848,  1.0000000),
nrow = 4, byrow = TRUE)

colnames(Br) <- c("Performance",  "Self_confidence",  "Cognitive", "Somatic" )

rownames(Br) <- colnames(Br)

## Proposed path model
model <- "## Regression paths
Performance ~  Self_confidence  + Cognitive  + Somatic
Self_confidence ~ Cognitive + Somatic "

find_B(model, Br)

[Package mars version 0.2.2 Index]