Description Usage Arguments Author(s) Examples
View source: R/CheckRAMMatrices.R
Checks if the input matrices are in the correct form.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | CheckRAMMatrices(
A,
S = NULL,
u = NULL,
Filter = NULL,
C = NULL,
C.scaled = NULL,
v = NULL,
...
)
## Default S3 method:
CheckRAMMatrices(
A,
S = NULL,
u = NULL,
Filter = NULL,
C = NULL,
C.scaled = NULL,
v = NULL,
...
)
## S3 method for class 'yac_symbol'
CheckRAMMatrices(
A,
S = NULL,
u = NULL,
Filter = NULL,
C = NULL,
C.scaled = NULL,
v = NULL,
...
)
|
A |
|
S |
|
u |
vector of length |
Filter |
|
C |
|
C.scaled |
|
v |
vector of length |
... |
... |
Ivan Jacob Agaloos Pesigan
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | # Numeric -----------------------------------------------------------
# This is a numerical example for the model
# y = alpha + beta * x + e
# y = 0 + 1 * x + e
A <- S <- matrixR::ZeroMatrix(3)
A[1, ] <- c(0, 1, 1)
colnames(A) <- rownames(A) <- c("y", "x", "e")
diag(S) <- c(0, 0.25, 1)
u <- c(0.00, 0.50, 0.00)
Filter <- diag(2)
Filter <- cbind(Filter, 0)
C <- matrix(
data = c(
1.25, 0.25, 1.00,
0.25, 0.25, 0.00,
1.00, 0.00, 1.00
),
nrow = dim(A)[1]
)
v <- c(0.50, 0.50, 0.00)
CheckRAMMatrices(
A = A,
S = S,
u = u,
Filter = Filter,
C = C,
v = v
)
# Symbolic ----------------------------------------------------------
# This is a symbolic example for the model
# y = alpha + beta * x + e
# y = 0 + 1 * x + e
A <- S <- matrixR::ZeroMatrix(3)
A[1, ] <- c(0, "beta", 1)
diag(S) <- c(0, "sigmax2", "sigmae2")
u <- c("alpha", "mux", 0)
C <- matrix(
data = c(
"sigmax2*beta^2+sigmae2", "sigmax2*beta", "sigmae2",
"sigmax2*beta", "sigmax2", 0,
"sigmae2", 0, "sigmae2"
),
nrow = dim(A)[1]
)
v <- c("alpha+beta*mux", "mux", 0)
CheckRAMMatrices(
A = Ryacas::ysym(A),
S = S,
u = u,
Filter = Filter,
C = C,
v = v
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.