intermediate r - nonlinear regression in r

4
Nonlinear Regression in R Violeta I. Bartolome Senior Associate Scientist PBGB-CRIL [email protected] Nonlinear Regression An extended linear regression technique in which a nonlinear mathematical model is used to describe the relationship between the response variable and the predictor variables. A nonlinear regression model is a model that contains at least one of the parameters in a nonlinear form Example ε ε ε + + + α α α = = = β β β X Y ) , 0 ( ~ 2 σ σ σ ε ε ε N Linearized Nonlinear Model The linearized form of the example is: X Y log log log β β β + + + α α α = = = The normality assumption for the error term will not be appropriate for the linearized form. Hence, if a nonlinear model is assumed to be appropriate for the data, the nonlinear model should be used for the analysis instead of the linearized form. Parameter Estimation Iterative procedures are used May require users to supply initial estimates of parameters User should know the biological interpretation of the parameters to provide intelligent initial values. The function getInitial() may also be used.

Upload: vivay-salazar

Post on 22-Nov-2014

842 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Intermediate R - Nonlinear Regression in R

Nonlinear Regression in R

Violeta I. Bartolome

Senior Associate Scientist

PBGB-CRIL

[email protected]

Nonlinear Regression

• An extended linear regression technique in which a nonlinear mathematical model is used to describe the relationship between the response variable and the predictor variables.

• A nonlinear regression model is a model that contains at least one of the parameters in a nonlinear form

• Example

εεεε++++αααα==== ββββXY ),0(~2σσσσεεεε N

Linearized Nonlinear Model

• The linearized form of the example is:

XY logloglog ββββ++++αααα====

• The normality assumption for the error term

will not be appropriate for the linearized

form.

• Hence, if a nonlinear model is assumed to

be appropriate for the data, the nonlinear

model should be used for the analysis

instead of the linearized form.

Parameter Estimation

• Iterative procedures are used

• May require users to supply initial estimates of parameters

• User should know the biological interpretation of the parameters to provide intelligent initial values.

• The function getInitial() may also be used.

Page 2: Intermediate R - Nonlinear Regression in R

Logistic growth curve

• Sample data

Severity represents the number

of lesions on the leaf surface,

standardized as a proportion of

the maximum.

Read and Plot Data

Graph shows a logistic

relationship.

Logistic model:

rtey −−−−ββββ++++

αααα====1

Initial values

scal

inputxmid

e

Asymy −−−−

++++

====

1

rtey −−−−ββββ++++

αααα====1

SSlogis creates initial estimates of the parameters Asym,

xmid, and scal from the model:

The model that we are estimating is: inputtscal

r

scal

xmidAsym

========

====ββββ====αααα

1

Estimate Parameters

Page 3: Intermediate R - Nonlinear Regression in R

Check fit of data

Other Non-linear Models

• Exponential

εεεε++++==== rxeyy 0

Other Non-linear Models

• Monomolecular

(((( )))) εεεε++++−−−−−−−−==== −−−−rxeyy 011

Page 4: Intermediate R - Nonlinear Regression in R

Other Non-linear Models

• Logistic

rxey

yy

−−−−

−−−−++++

====

0

011

1

Other Non-linear Models

• Gompertz

rxyeey −−−−==== 0log

Other Non-linear Models

• Weibull

c

b

ax

ey

−−−−−−−−

−−−−==== 1 Thank you!