stepMLRMPA: Multiple Linear Regression Model Population Analysis

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/stepMLRMPA.R

Description

Following the variance and correletion selection, the function stepMLRMPA is to perform the clustering procedures, random sampling, building a model, validation the model and printing the model and statistic parameters to the specified files.

Usage

1
stepMLRMPA(tree, Clusters, N, op1, op2,tr.tst)

Arguments

tree

a hierarchical tree of variables resulting from hclustvar into several clusters by specifying the desired number of clusters

Clusters

an integer scalar with the desired number of clusters

N

an integer scalar with the desired number of sampling and modeling times

op1

a txt file used for save the statistical parameters

op2

a txt file used for save the model

tr.tst

a list calculated by VarCor function

Details

The specific procedure can be seen in the figure 1.

Value

Clusterth_size

the number of variables in each cluster

Author(s)

Xiaoyun Zhang, Meihong Xie

References

M.Chavent, V. Kuentz, B.Liquet, L. Saracco, J. Stat. Softw. 2012, 50, 1-16.

See Also

hclustvar VarCor

Examples

 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
##  'var.lower' and 'var.upper' are the variance selection range 
var.lower<-0.05
var.upper<-0.07

##  'xy.cor' is the correlation selection range
xy.cor<-0.3

## 'tst' is the number of test set
tst<-c(72:101)
data(activity)
data(descriptor)
data(deleted_descriptor)
tr.tst<-VarCor(tst,activity,descriptor,deleted_descriptor,var.lower,var.upper,xy.cor)

## the variance distribution of the original dataset
plotvar(tr.tst[[3]],tr.tst[[1]])

## the variance distribution of the dataset with variance and correlation selection
plotvar(tr.tst[[4]],tr.tst[[1]])

## the correlation distribution of the original dataset
plotcor(tr.tst[[4]],tr.tst[[1]])

## the correlation distribution of the dataset with variance and correlation selection
plotcor(tr.tst[[4]],tr.tst[[1]])

xtr<-as.data.frame(tr.tst[[4]])
ytr<-as.data.frame(tr.tst[[1]])
xtst<-as.data.frame(tr.tst[[5]])
ytst<-as.data.frame(tr.tst[[2]])

## variables clustering
tree<-hclustvar(xtr)

Clusterth.SIze2<-stepMLRMPA(tree,2,5,op1="statistic_parameters02.txt",op2="model02.txt",tr.tst)
Clusterth.SIze3<-stepMLRMPA(tree,3,5,op1="statistic_parameters03.txt",op2="model03.txt",tr.tst)

MLRMPA documentation built on May 29, 2017, 10:17 a.m.