[R-sig-eco] How can get P value of regression tree and LOWESS in R.

Gavin Simpson gavin.simpson at ucl.ac.uk
Wed Oct 12 10:41:41 CEST 2011


On Wed, 2011-10-12 at 11:44 +0800, 刘朔孺 wrote:
> Dear all,
> I want to use Regression tree and Lowess methods for calculating
> ecological threshold. but I don't know that what codes did I use to
> get P value. 
> Thanks for your time, best wishes. 

Regression trees, in the spirit of the CART book by Breiman et al, are
available in recommended package rpart. It doesn't give p-values, but
rather focusses on building the best model from a set of features as
measured by some concept of deviance (MSE). This predictive ability is
assessed via k-fold cross-validation during fitting or an independent
test set.

If you want p-values here, and know what conditional inference trees
are, then try the party package.

LO[W]?ESS is available in lowess() or loess() (the latter is more modern
and feature-rich). Again, these don't give p-values

If you want p-values here, perhaps try the additive model framework in
recommended package mgcv or package gam. The latter can include loess
smooths but mgcv contains a better suite of functions for fitting GAMs.

That said - it all you are interested in are the p-values, then I might
suggest you find interest in some other aspects of the
modelling/statistics. Plugging data into these techniques to churn out
p-values is a recipe for getting bitten.

G

> 
> 2011-10-12 
> 
> 
> 
> ˷
> ˮϪ̬ʵ
> ֲѧԺ
> Ͼũҵѧ
>  Ͼ ·1 
> 
>  
> Liu Shouru
> Department of Entomology
> Nanjing Agricultural University
> Nanjing, Jiangsu Province 210095
> P. R. China
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-sig-ecology mailing list