Description Usage Arguments Details Value Author(s) References See Also Examples
The function estimates linear regression via graphical models in an unbiased way. This function aims to deal with studies where all covariates need to be kept in the model (such as portfolio optimisation), when the sample size is much less than covariate numbers. It supports both serial and parallel computations. However, the available computational resources should be considered before choosing one of the two options. For any given data, an estimated graph, regression parameters and errors are returned.
1 |
x |
A matrix of |
y |
A response vector of length |
centering |
If equal to |
lambda |
The amount of regularisation for shrinking the graph. The default is |
parallel |
Logical.Whether or not to do parallel computation. If set to |
clusters |
The number of child nodes that must be created in the cluster if the |
c.size |
The allowed size of the clique (should not be greater than n). The default is |
The parallel options also work for Windows. Care should be taken in creating the cluster as all types of clusters do not work for Windows, e.g. FORK
.
A list of three values:
Graph |
The estimated graph for the given data. |
Beta |
The vector of estimated regression parameters based on the estimated graph. |
SSE |
Sum of squares of errors for the parameters. |
SE |
Estimated standard errors for the parameters. |
Saeed Aldahmani
Alan, G. Frank, B. (2009), Computation of Multivariate Normal and t Probabilities. Lecture Notes in Statistics, Vol. 195., Springer-Verlag, Heidelberg. ISBN 978-3-642-01688-2.
Alan, G. Frank, B. Tetsuhisa, M. Xuefe, M. Friedrich, L. Fabian, S. and Torsten, H. (2019). mvtnorm: Multivariate Normal and t Distributions. R package version 1.0-7. URL http://CRAN.R-project.org/package=mvtnorm.
Aldahmani, S. and Dai, H. (2015). Unbiased Estimation for Linear Regression When n< v. International Journal of Statistics and Probability, 4(3), p61.
Csardi, G., and Nepusz, T. (2006). The igraph software package for complex network research. InterJournal, Complex Systems, 1695(5), 1-9.
Dethlefsen, C., and H?jsgaard, S. (2005). A common platform for graphical models in R: The gRbase package. Journal of Statistical Software, 14(17), 1-12.
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | ###################################
# Example with serial processing.
###################################
library(gRbase)
library(igraph)
#load the data
data(qsbralks)
x <- as.matrix(qsbralks[,1:15])
y <- as.matrix(qsbralks[,22])
# Get the graph
# Call GLSE(.) .
results <- GLSE(x,y,parallel=FALSE)
# The returned objects are
results$Graph
results$Beta
results$SSE
results$Error
# Call plotG(.).
plotG(results$Graph)
###################################
# Example with parallel processing.
###################################
library(gRbase)
library(igraph)
library(parallel)
#load the data
data(qsbralks)
x <- qsbralks[,1:15]
y <- qsbralks[,22]
# Create cluster
cl <- makeCluster(2)
# Send the gRbase package to all the nodes
clusterEvalQ(cl, library(gRbase))
# Call GLSE(.) .
results <- GLSE(x,y,parallel=TRUE,clusters=cl)
# Stop the cluster
stopCluster(cl)
# The returned objects are
results$Graph;
results$Beta;
results$SSE;
results$Error;
# Call plotG(.) .
plotG(results$Graph)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.