Hi, I'm just wonder if there is an R equivalent function of gam() - which exist in Splus. Also does anyone know if the library( modreg ), which comes with the installation file of R 1.3.0 (Windows version), exists in the previous versions of R (again, Windows version)? Or does one need to install the library into the previous versions of R explicitly? Thanks, Ko-Kang Wang ------------------------------------------------------------------------------ Ko-Kang Kevin Wang Statistical Analysis Division Leader Software Developers' Klub (SDK) University of Auckland New Zealand -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 13 Aug 2001, Ko-Kang Kevin Wang wrote:> Hi, > > I'm just wonder if there is an R equivalent function of gam() - which > exist in Splus.See packge mgcv, and the latest Rnews.> Also does anyone know if the library( modreg ), which comes with the > installation file of R 1.3.0 (Windows version), exists in the previous > versions of R (again, Windows version)? Or does one need to install the > library into the previous versions of R explicitly?It's been there for at least 2.5 years. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi all,
I can't figure out why the following function when supplied to nlm,
isn't
using the gradient function that I am providing, everything I read says to
attach "gradient" attribute to the return value...no?
atanE <- function(a) {
gr <- function(a){
g<-numeric()
print("adsad") #I never get this
g[4]<-sum(2*(a[1]*atan((a[2]*x)-a[3])+a[4]-y))
g[3]<-sum(g[4]*(-(a[1]/(1+((a[2]*x)-a[3])^2))))
g[2]<-sum(g[3]*x)
g[1]<-sum(g[4]*atan((a[2]*x)-a[3]))
g
}
value<-sum( ((a[1]*atan((a[2]*x)-a[3])+a[4]) - y)^2 )
attr(value, "gradient")<-gr
value
}
Sorry for the bother,
Maneesh
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> I'm just wonder if there is an R equivalent function of gam() - which > exist in Splus.library(mgcv) help(gam) Cheers Jason -- Indigo Industrial Controls Ltd. 64-21-343-545 jasont at indigoindustrial.co.nz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._