Last data update: 2014.03.03

R: Design Matrix for Path Analyses
pathR Documentation

Design Matrix for Path Analyses

Description

Forms design matrix for path analyses that involve paths within residual blocks

Usage

path(cause=NULL, effect=NULL, k)

Arguments

cause

integer; index of predictor ‘trait’ within residual block

effect

integer; index of response ‘trait’ within residual block

k

integer; dimension of residual block

Value

design matrix

Note

For more general path anlaytic models see sir which allows paths to exist between responses that are not in the same residual block. However, sir does not handle non-Gaussian or missing responses. Note that path models involving non-Gaussian data are defined on the link scale which may not always be appropriate.

Author(s)

Jarrod Hadfield j.hadfield@ed.ac.uk

See Also

sir

Examples

path(1, 2,2)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MCMCglmm)
Loading required package: Matrix
Loading required package: coda
Loading required package: ape
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MCMCglmm/path.Rd_%03d_medium.png", width=480, height=480)
> ### Name: path
> ### Title: Design Matrix for Path Analyses
> ### Aliases: path
> ### Keywords: manip
> 
> ### ** Examples
> 
> path(1, 2,2)
     [,1] [,2]
[1,]    0    0
[2,]    1    0
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>