当前位置:网站首页>Create a nonlinear least squares test in R

Create a nonlinear least squares test in R

2022-06-26 02:45:00 Mrrunsen

stay R The basic syntax for creating nonlinear least squares tests in is -

nls(formula, data, start)

The following is a description of the parameters used -

The formula is a nonlinear model formula containing variables and parameters .

Data is a data frame used to evaluate variables in a formula .

start Is a named list of starting estimates or a named number vector .

Example
We will consider a nonlinear model that assumes the initial value of its coefficients . Next , We will see what the confidence intervals for these assumptions are , So that we can judge the applicability of these values in the model .


Let's assume that the initial coefficient is 1 and 3, And fit these values to nls() Function .

xvalues <- c(1.6,2.1,2,2.23,3.71,3.25,3.4,3.86,1.19,2.21)
yvalues <- c(5.19,7.43,6.94,8.11,18.75,14.88,16.06,19.12,3.21,7.58)

# Give the chart file a name.
png
原网站

版权声明
本文为[Mrrunsen]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206260130504176.html