curvature: Calculate (IE) Intrinsic curvature and (PE) Parameter...

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/curvature.R

Description

IE and PE are measures to identify the linear approximation of nonlinear model is appropriate or no. This function may not be called explicitly by user.

Usage

1
curvature(gradient, hessian, sigma)

Arguments

gradient

n by p gradient of fited model.

hessian

n by p by p array of hessian for the nonlinear model.

sigma

estimated standard deviation.

Details

Gauss Newton method of estimation is based on linear approximation to nonlinear model. The linear approximation to function might not be appropriate. PE and IE is used to identify the parameter effect and intrinsic effect of model. Big values represent the linear approximation to nonlinear model is not correct.

Value

List of curvature values.

Note

curvature is a model checking tool. From the OLS estimate output included carvature that can be accessed by curvature slot of the output object, therefore do not need to be called explicitly by user.

Author(s)

Hossein Riazoshams, May 2014. Email: riazihosein@gmail.com URL http://www.riazoshams.com/nlr/

References

Bates, D.M., and Watts, D. G. (1980). Relative curvature measures of nonlinearity, J. R. statistic. Ser. B 42: 1-25.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 crbdt<-list(xr=nlr::carbon$year,yr=nlr::carbon$co2)
 ScalExp<- convexpr2nlform(yr ~ p1 + exp(-(p2 - p3 * xr)),
                        selfStart=function(data){
                            y1 <-as.double(data$yr)
                            p1<-min(y1)
                            y<-log(y1-p1+10*.Machine$double.eps)
                            x<-as.double(data$xr)
                            b1<-lm(y~x)
                            p2<- -b1$coefficients[1]
                            p3<- b1$coefficients[2]
                            return(list(p1=p1,p2=p2,p3=p3))
                        },
                        name="Scaled Exp convex",
                        start=list(p1=700,p2=21,p3=0.01)
)
 carbon.ols <- nlr(formula=ScalExp, data=crbdt, 
                  control=nlr.control(method="OLS"))
carbon.ols$curvature                  

nlr documentation built on July 31, 2019, 5:09 p.m.

Related to curvature in nlr...