Library: | xclust |
See also: | cartdrawpdfclass |
Quantlet: | cartdrawpdfregr | |
Description: | generates TEX file of regression tree |
Usage: | cartdrawpdfregr(VarMatrix,ClassVector,MinSize, FilePath) | |
Input: | ||
VarMatrix | n x m matrix, variables | |
ClassVector | n x 1 vector, classes | |
MinSize | scalar, stop condition, minimum number of observations in terminal node | |
FilePath | complete path to the file, including the name of the file, e.g. c:\tree.tex |
library("xclust"); x1 = #(0.898473738, 0.852630806, 0.539114276, 0.241251175, 0.476125641, 0.284315731, 0.0181318590) x2 = #(0.255756912, 0.303028656, 0.146633917, 0.121365982, 0.4111506, 0.97609203, 0.514180304) x = x1~x2; y = #(1.1, 1.2, 1.3, 0.1, 1.45, 2.2, 1.465) //Plot tree in TeX //Change for the appropriate file name here: filename = "c:\RegressionTree.tex" cartdrawpdfregr(x,y,1,filename);
Generates TEX tree, can be then compiled TEX->PS->PDF (Not Tex -> PDF)