简体   繁体   中英

How to solve multivariable nonlinear equotation systems? [R]

I have three equotations with 3 unknown variables like this:

在此处输入图片说明

Assume that the following variables are given as parameters: 在此处输入图片说明

Desired, not given: 在此处输入图片说明

What I want is that when I pass three parameters it should give me the solution of the remaining ones. What's the simpliest way to do this in R? Because I'm a beginner I would like to have some (short) explanations. :)

Solving for sigma.eps^2 is a matter of mathematics. In the second equation you can substitute a (take the expression from the third equation). Then you can solve for sigma.eps^2 . After that you can calculate a and then b :

sigma.eps2 <- (1-p^2)*sigma2^2 # sigma.eps2 stands for sigma.eps^2
sigma.eps <- sqrt(sigma.eps2)
a <- (sigma.eps / sigma1) * p / sqrt(1-p^2)
b <- mu2 - a*mu1

Eventually the second value for sigma.eps is relevant. In this case the second value is:

sigma.eps <- -sqrt(sigma.eps2)

This would also implicate other values for a and b (to compute in the same way as above).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM