Oil {nlsmsn} | R Documentation |
Oil palm yield
Description
Growth and yield of palm oil
Usage
data(Oil)
Format
A data frame with 19 observations of oil characteristics
Author(s)
Aldo Garay amedina@ime.usp.br, Marcos Prates marcosop@est.ufmg.br and Victor Lachos hlachos@ime.unicamp.br
Source
Aldo M. Garay, Victor H. Lachos, Carlos A. Abanto-Valle (2011). "Nonlinear regression models based on scale mixture of skew-normal distributions". Journal of the Korean Stastical Society, 40, 115-124.
Examples
## Not run:
##Load the data
data(Oil)
##Define non linear function
nlf<-function(x,betas){
resp<- betas[1]/(1 +betas[2]*exp(-betas[3]*x))
return(resp)
}
##Set the response y and covariate x
y <- Oil$y
x <- Oil$x
##Set initial values
betas <- c(37,4.81,0.78)
sigma2 <- 2.95
shape <- -2
nu <- 3
## Skew.normal regression
analysis.sn <- smsn.nl(y=y, x=x, betas=betas, sigma2=sigma2,
shape = shape, nlf = nlf, criteria = TRUE,
family = "Skew.normal", iter.max = 200)
## Skew.t regression
analysis.st <- smsn.nl(y=y, x=x, betas=betas, sigma2=sigma2, shape = shape,
nu = nu, nlf = nlf, criteria = TRUE,
family = "Skew.t", iter.max = 200)
## End(Not run)
[Package nlsmsn version 0.0-6 Index]