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: [EMAIL PROTECTED] tel: 604-675-8000 x7561 BCCRC Molecular Oncology 675 West 10th Ave, Floor 4 Vancouver B.C. V5Z 1L3 Canada -----Original Message----- From: [EMAIL PROTECTED] on behalf of Vadim Ogranovich Sent: Tue 4/17/2007 1:06 PM To: [email protected] 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]] ______________________________________________ [email protected] 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. ______________________________________________ [email protected] 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.
