[R] extracting intercept from ppr fit

Steven McKinney smckinney at bccrc.ca
Wed Apr 18 22:06:24 CEST 2007


Hi Vadim,

Estimates of the "alpha_0" terms in MASS are the $yb component
of the object returned by ppr().  As I understand it,
the original PPR algorithm assumes the response
variable(s) are centered, so the 'alpha_0' term in
MASS is just the mean of the response if the user
does not center the responses.  Your actual 'a' term
will not appear in the output of ppr.

> n <- 1000
> data <- data.frame(x= rnorm (n), y= rnorm (n))
> a <- 10
> data$z <- evalq(a + atan (x + y) + rnorm (n), data)
> data.ppr <- ppr(z ~ x + y, data=data, nterms =1)
> ## how to extract a = 10 from data.ppr?
> data.ppr$yb
[1] 9.973964
> a <- 210
> data$z <- evalq(a + atan (x + y) + rnorm (n), data)
> data.ppr <- ppr(z ~ x + y, data=data, nterms =1)
> data.ppr$yb
[1] 209.9773
> 


HTH

Steven McKinney

Statistician
Molecular Oncology and Breast Cancer Program
British Columbia Cancer Research Centre

email: smckinney at bccrc.ca

tel: 604-675-8000 x7561

BCCRC
Molecular Oncology
675 West 10th Ave, Floor 4
Vancouver B.C. 
V5Z 1L3
Canada




-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch on behalf of Vadim Ogranovich
Sent: Tue 4/17/2007 1:06 PM
To: r-help at stat.math.ethz.ch
Subject: Re: [R] extracting intercept from ppr fit
 
Sorry for triple-posting : I seem to have a problem w/ my mail client. 

Hi, 

Is there a way, documented or not, to extract the intercept term (the alpha_0 the MASS book) from a ppr() (Projection Persuit Regression) fit? 

Thanks, 
Vadim 

## Example: 
n <- 1000 

data <- data.frame(x= rnorm (n), y= rnorm (n)) 

a <- 10 
data$z <- evalq(a + atan (x + y) + rnorm (n), data) 

data.ppr <- ppr(z ~ x + y, data=data, nterms =1) 

## how to extract a = 10 from data.ppr? 
	[[alternative HTML version deleted]]

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list