1 | mcslope(X, Y, con, k)
|
X |
|
Y |
|
con |
|
k |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (X, Y, con, k)
{
J = length(X)
slopes <- numeric(J)
covar <- numeric(J)
for (j in 1:J) {
tempx <- as.matrix(X[[j]])
tempy <- as.matrix(Y[[j]])
slopes[j] <- lsfit(tempx, tempy)$coef[k]
covar[j] <- lsfitNci4(tempx, tempy)$cov[k, k]
}
dif.slopes <- t(con) %*% slopes
o.se <- t(con^2) %*% covar
o.stat <- dif.slopes/sqrt(o.se)
om <- max(abs(o.stat))
om
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.