View source: R/data_gen.R View source: R/nda.R
data_gen | R Documentation |
Generate random block matrix for Generalized Network-based Dimensionality Reduction and Analysis (GNDA)
data_gen(n,m,nfactors=2,lambda=1)
n |
number of rows |
m |
number of columns |
nfactors |
number of blocks (factors, where the default value is 2) |
lambda |
exponential smoothing, where the default value is 1 |
n
, m
, nfactors
must beintegers, and they are not less than 1; lambda should be a positive real number.
M |
a dataframe of a block matrix |
Prof. Zsolt T. Kosztyan, Department of Quantitative Methods, Institute of Management, Faculty of Business and Economics, University of Pannonia, Hungary
e-mail: kzst@gtk.uni-pannon.hu
# Specification 30 by 10 random block matrices with 2 blocks/factors
df<-data_gen(30,10)
library(psych)
scree(df)
biplot(ndr(df))
# Specification 40 by 20 random block matrices with 3 blocks/factors
df<-data_gen(40,20,3)
library(psych)
scree(df)
biplot(ndr(df))
plot(ndr(df))
# Specification 50 by 20 random block matrices with 4 blocks/factors
# lambda=0.1
df<-data_gen(50,15,4,0.1)
scree(df)
biplot(ndr(df))
plot(ndr(df))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.