| Title: | Fitting Nonlinear Models with Scale Mixture of Skew-Normal Distributions | 
| Date: | 2020-12-22 | 
| Version: | 0.0-6 | 
| Description: | Fit univariate non-linear scale mixture of skew-normal(NL-SMSN) regression, details in Garay, Lachos and Abanto-Valle (2011) <doi:10.1016/j.jkss.2010.08.003> and Lachos, Bandyopadhyay and Garay (2011) <doi:10.1016/j.spl.2011.03.019>. | 
| Depends: | R (≥ 2.10.0) | 
| Author: | Marcos Prates [aut, cre, trl], Victor Lachos [aut], Aldo Garay [aut] | 
| Maintainer: | Marcos Prates <marcosop@est.ufmg.br> | 
| License: | GPL (≥ 3.0) | 
| Packaged: | 2020-12-22 18:11:42 UTC; marcos | 
| Repository: | CRAN | 
| NeedsCompilation: | no | 
| Date/Publication: | 2021-01-20 18:10:02 UTC | 
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)
Ultrasonic Calibration
Description
The data is a result of a ultrasonic calibration study perfomed by National Institute of Standard and Technology.
Usage
data(Ultrasonic)Format
A data frame with 214 observations with y as the ultrasonic measuraments and x the metal distance
Author(s)
Aldo Garay amedina@ime.usp.br, Marcos Prates marcosop@est.ufmg.br and Victor Lachos hlachos@ime.unicamp.br
Source
Victor H. Lachos, Dipankar Bandyopadhyay and Aldo M. Garay (2011). "Heteroscedastic nonlinear regression models based on scale mixture of skew-normal distributions". Statistics -and Probability Letters, 81, 1208-1217.
Examples
## Not run: 
##Load the data
data(Ultrasonic)
##Define non linear function
nlf<-function(x,betas){
resp<- exp(-betas[1]*x)/(betas[2] + betas[3]*x)
return(resp)
}
##Set the response y and covariate x
y <- Ultrasonic$y
x <- Ultrasonic$x
##Set initial values
z <- x
betas <- c(0.1913, 0.0061, 0.0110)
rho <- -0.1
sigma2 <- 3.2726
shape <- 0.1698
nu <- 4
## Skew.normal regression
analysis.sn <- smsn.nl(y = y, x = x, z = z, betas = betas, sigma2 = sigma2, shape = shape, 
                       rho = rho, nlf = nlf, rho.func = 2, reg.type = "Heteroscedastic", 
                       criteria = TRUE, family = "Skew.normal", iter.max = 200)
## Skew.t regression
analysis.st <- smsn.nl(y = y, x = x, z = z, betas = betas, sigma2 = sigma2, shape = shape, nu = nu, 
                       rho = rho, nlf = nlf, rho.func = 1, reg.type = "He", 
                       criteria = TRUE, family = "Skew.t", iter.max = 200)
## End(Not run)
Fit univariate NL-SMSN regression
Description
Return EM algorithm output for NL-SMSN regression for both "Homoscedastic" and "Heteroscedastic" (univaritate case, p=1).
Usage
smsn.nl(y, x = NULL, z = NULL, betas = NULL, sigma2 = NULL, 
shape = NULL, rho = NULL, 
nu = NULL, nlf = NULL, rho.func = 1, 
reg.type = "Homoscedastic", criteria = FALSE, 
family = "Skew.t", error = 1e-05, iter.max = 100)
Arguments
| y | the response vector | 
| x | the independent covariates | 
| z | the independent covariates for sigma2. "Heteroscedastic" model ONLY! | 
| betas | regression coefficient(s) vector | 
| sigma2 | initial value for the scale parameter | 
| shape | initial value for the skewness parameter | 
| rho | initial value for "Heteroscedastic" coefficient rho. "Heteroscedastic" model ONLY! | 
| nu | the parameter of the scale variable (vector or scalar) of the SMSN family (kurtosis parameter). For the "Skew.cn" must be a vector of length 2 and values in (0,1) | 
| nlf | non linear function for the regression | 
| rho.func | Choose the type of heteroscedasticity for sigma2. If rho.func == 1 ( f(z,rho) = exp(z*rho) ) and rho.func == 2 ( f(z,rho) = z^rho ). | 
| reg.type | the type of possible regression: "Homoscedastic" or "Ho"; "Heteroscedastic" or "He". | 
| criteria | if TRUE, loglik, AIC, BIC will be calculated | 
| family | distribution famility to be used in fitting ("t", "Skew.t", "Skew.cn", "Skew.slash", "Skew.normal", "Normal") | 
| error | the covergence maximum error | 
| iter.max | maximum iterations of the EM algorithm | 
Value
Estimated values of the location, scale, skewness, regression coefficients and "Heteroscedastic" coefficient (when reg.type = "He").
Author(s)
Aldo Garay amedina@ime.usp.br, Marcos Prates marcosop@est.ufmg.br and Victor Lachos hlachos@ime.unicamp.br
References
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.\
Victor H. Lachos, Dipankar Bandyopadhyay and Aldo M. Garay (2011). "Heteroscedastic nonlinear regression models based on scale mixture of skew-normal distributions". Statistics -and Probability Letters, 81, 1208-1217.
Examples
 ##see examples in \code{\link{Oil}} and \code{\link{Ultrasonic}}