Library: | metrics |
See also: | glm redun makedesign |
Quantlet: | dpls | |
Description: | calculating latent variables, weights, loadings and path coefficients with dynamic partial least squares algorithm |
Usage: | {wg,b,sk,sdv,skl,slv,lk,iter} = dpls(w,d,dy,dl,y,lag,genau) | |
Input: | ||
w | a matrix with start weights same dimensions as dy | |
d | a kxk matrix with inner unlagged designs (0 or 1) no diagonal values allowed | |
dy | a lxk matrix with outer designs (0 or 1) rows are counting manifest variables | |
dl | a kxk matrix with inner lagged designs (0 or 1) diagonal elements are showing autoregression | |
y | a nxl matrix with manifest variables (indicators) | |
lag | a scalar of lag order | |
genau | a scalar with canceling criterion | |
Output: | ||
wg | a matrix with weights | |
b | a matrix with loadings | |
sk | a matrix with path coefficients with dimensions like d (kxk) | |
sdv | a matrix with standarddeviations of path coefficients with dimensions like d (kxk) | |
skl | a matrix with lagged path coefficients with dimensions like d (kxk) and ordered like designed | |
slv | a matrix with standarddeviations of path coefficients with dimensions like d (kxk) | |
lk | a matrix with latent variables | |
iter | a scalar shows how many iterations used |
library("xplore") y=read("indikat.dat") dy=read("dy.dat") d=read("d.dat") dl=read("dl.dat") w=dy {wg,b,sk,sdv,skl,slv,lk,iter}=dpls(w,d,dy,dl,y,1,3)
Content of subject wg [1,] 0.0041037 0 0 [2,] 0.0012524 0 0 [3,] -6.9495e-05 0 0 [4,] 0.005811 0 0 [5,] 0 0.015399 0 [6,] 0 0.0021495 0 [7,] 0 0.0070099 0 [8,] 0 0 0.01665 [9,] 0 0 0.0046898 Content of object b [1,] 78.476 0 0 [2,] 23.739 0 0 [3,] -3.259 0 0 [4,] 111.51 0 0 [5,] 0 54.125 0 [6,] 0 6.5044 0 [7,] 0 21.761 0 [8,] 0 0 55.625 [9,] 0 0 15.746 Content of object sk [1,] 0 0 0 [2,] 0 0 0 [3,] 1.3396 0.0182 0 Content of object skl [1,] 0 0 0 [2,] 0 0 0 [3,] -0.8048 0 0.4273 Content of object lk [1,] -1.6271 -1.5907 -1.5722 -1.4829 ... [2,] -1.6089 -1.5927 -1.59 -1.5687 ... [3,] -2.2242 -1.928 -1.874 -1.5195 ... Content of object iter [1,] 3
Library: | metrics |
See also: | glm redun makedesign |