Determines the optimally pruned size of the regression trunk by applying the c*standard error rule to the results from the crossvalidation procedure.
1 2 
tree 
a tree of class 
data 
the dataset that was used to create the regression trunk. 
c.par 
the pruning parameter (c) that will be used in the c*SE rule. In the default option, the pruning function uses the best value of c, as recommended by Dusseldorp, Conversano & van Os (2010). This best value depends on the sample size of the included dataset. 
... 
additional arguments to be passed. 
The function returns the pruned regression trunk, and the corresponding regression trunk model. The output is an object of class rt
. If the pruning rule resulted in the root node, no object is returned.
Dusseldorp, E. Conversano, C., and Os, B.J. (2010). Combining an additive and treebased regression model simultaneously: STIMA. Journal of Computational and Graphical Statistics, 19(3), 514530.
stima,summary.rt
1 2 3 4 5 6 7 8 9 10 11  #Example with employee data
data(employee)
#a regression trunk with a maximum of three splits is grown
#variable used for the first split (edu) is third variable in the dataset
#twofold crossvalidation is performed to save time in the example,
#tenfold crossvalidation is recommended
emprt1<stima(employee,3,first=3,vfold=2)
summary(emprt1)
#prune the regression trunk
emprt1_pr<prune(emprt1,data=employee)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.