sim_lu | R Documentation |
This function can be used to generate land use data from a data generating process
sim_lu(
n,
J = 3,
tt = 2,
k = 1,
areas = stats::runif(n),
alphas = cbind(matrix(stats::runif(tt * (J - 1)), tt, J - 1), 0),
xmat = matrix(stats::rnorm(n * k), n, k),
betas = cbind(matrix(stats::rnorm(k * (J - 1)), k, J - 1), 0)
)
n |
Number of spatial observations |
J |
Number of land use classes |
tt |
Number of time steps to simulate |
k |
Number of covariates to simulate |
areas |
Vector of dimensions |
alphas |
Matrix of dimensions |
xmat |
Matrix of dimensions |
betas |
Matrix of dimensions |
The generated multinomial logit land use model over J
distinct land uses
(with j',j = 1,...,J
) takes the form:
y_{ijt} = \frac{\exp(\alpha_{jt} + X_i \beta_j)}{ \sum^{J}_{j' = 1} \exp(\alpha_{jt} + X_i \beta_{j'})}
with X_i
being the i
-th row of the n \times k
matrix X
. \beta_j
is the
k \times J
matrix of land use class specific slope parameters. \alpha_{jt}
are class
specific intercepts, which are typically optimised using the bias correction method. These are assumed
to vary over time.
For the purpose of identification the slope parameters \beta_J
and intercepts
\alpha_J
associated with the J
-th class have to be zero.
The function generates the NT \ times J
matrix Y
. Based on this, the function
generates a set of targets T_{jt}
for downscaling. These are calculated by:
T_{jt} = \sum^n_{i=1} y_{ijt} a_i
The output of this function can be directly used in downscale
.
A list with the generated \alpha
(alphas
), X
(xmat
),
\beta
(betas
), Y
(Y
),
and T
(targets
). The returned values are in long format as required by
downscale
.
dgp1 = sim_lu(n = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.