Description Usage Format Author(s) Source Examples
The data is a result of a ultrasonic calibration study perfomed by National Institute of Standard and Technology.
1 |
A data frame with 214 observations with y as the ultrasonic measuraments and x the metal distance
Aldo Garay amedina@ime.usp.br, Marcos Prates marcosop@est.ufmg.br and Victor Lachos hlachos@ime.unicamp.br
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.