pathmod: Extract latent variables in a formative-reflective model

Description Usage Arguments Value Examples

View source: R/pathmod.R

Description

Apply the method of Fattore, Pelagatti, Vittadini (2017) to extract latent variables in a formative-reflective model.

Usage

1
2
pathmod(xgroups, ygroups, data = NULL, cov = NULL, alphas = seq(0, 10)/10,
  xmean = NULL, ymean = NULL, xsd = NULL, ysd = NULL)

Arguments

xgroups

a list containing p char vectors with the names of the variables of each x-group.

ygroups

a list containing q char vectors with the names of the variables of each y-group.

data

the data frame with the observations (optional, but needed if you want the latent variable scores).

cov

the named covariance matrix of the variables (if you specify the data argument and leave it null, then cov is assigned the correlation matrix of data).

alphas

a numeric vector with values in the range [0, 1] for the α-weights.

xmean

optional parameter to center the x-variables taken from data, otherwise equal to their sample means

ymean

optional parameter to center the y-variables taken from data, otherwise equal to their sample means

xsd

optional parameter to scale the x-variables taken from data, otherwise equal to their sample standard deviations

ysd

optional parameter to scale the y-variables taken from data, otherwise equal to their sample standard deviations

Value

An object of class pathmod with slots:

omegas

list of matrices Ω, one for each element in alpha

gammas

list of matrices Γ, one for each element in alpha

lambdas

list of matrices Λ, one for each element in alpha

xlosses

vector of x-side losses, one for each element in alpha

ylosses

vector of y-side losses, one for each element in alpha

alphas

same as input argument (values of α)

p

number of x-groups

q

number of y-groups

Sxx

variance-covariance matrix of exogenous variables

Syx

covariance matrix with covariances between endogenous and exogenous variables

Syy

variance-covariance matrix of endogenous variables

xis

three-dimensional array with scores of the exogenous latent variables, one for each element in alpha (available only if data is assigned)

etas

three-dimensional array with scores of the endogenous latent variables, one for each element in alpha (available only if data is assigned)

xgroups

the argument xgroups

ygroups

the argument ygroups

xmean

the supplied argument xmean or the means of the x-variables in data

ymean

the supplied argument ymean or the means of the y-variables in data

xsd

the supplied argument xsd or the standard deviations of the x-variables in data

ysd

the supplied argument ysd or the standard deviations of the y-variables in data

Examples

1
2
3
4
data(russett)
xg <- list(c("gini", "farm", "rent"), c("gnpr", "labo"))
yg <- list(c("inst", "ecks", "death"))
pm <- pathmod(xg, yg, data = russett)

matteopelagatti/pathmod documentation built on May 29, 2019, 4:41 a.m.