Description Usage Arguments Value Examples
View source: R/sim_data_singular.R
The function returns either the results of penalized profile log-likelihood given a matrix of data or a vector of sample eigenvalues. The data matrix has the following decomposition X = WL + error, where the rows of X are linear projections onto the subspace W by some arbitrary latent vector plus error. The solution finds the rank of W, which represents the hidden structure in the data, such that X-WL have independent and identically distributed components.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
N |
the full dimension of the data |
K |
the true dimension of the |
M |
the number of features of observations |
sq_singular |
a vector of numeric values for the squared singular values. The other parameters can be skipped if this is supplied along with N, K, M. |
sigma2 |
a positive numeric between 0 and 1 for the error variance. |
last |
a positive numeric within reasonable range for the difference between the Kth eigenvalue and the (K+1)th, a very large difference might not be possible if K is large. |
trend |
a character, one of |
rho |
a numeric value between 0 and 1 for the amount of auto-correlation, i.e. correlation between sequential observations or features. |
df |
an integer for the degrees of freedom if |
dist |
a character specifying the error distribution to be one of |
datamat |
a logical to indicate whether both the data matrix and sample eigenvalues or only the sample eigenvalues should be returned |
a list containing the simulated data matrix and sample eigenvalues or a numerical vector of sample eigenvalues.
1 2 3 4 5 6 7 | ## Not run:
get_data_singular(N = 200, K = 5, M = 1000, sq_singular = c(5,4,2,1,1))
get_data_singular(N = 200, K = 5, M = 1000, sigma2 = 0.2, last= 0.1, trend = "exponential")
get_data_singular(N = 200, K = 5, M = 1000, sigma2 = 0.8, last= 0.1, trend = "exponential",
rho = 0.2, df = 5, dist = "t")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.