I have three equotations with 3 unknown variables like this:
Assume that the following variables are given as parameters:
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.