Answers.Body: <p>After much analysis of the model, I came to the conclusion that I will not be able to verify how the equilibrium points behave graphically. Since you will have to create a phase diagram in R ^ 5, there are five equations, and I can not do two-to-two comparison in these cases, because I will always have a function that depends on a variable that will not be placed, but will be in the equation plotted anyway.</p>
  
  <p>But in any case, if it were in three dimensions, for the purpose of information for those who are interested, the verification of the points would be to place the points (which in calculating have both numbers and not functions in function of other functions), within the model created, hence plot the phase diagram and check whether the arrows converge or not to the point. If they are converging, they are correct. </p>
  
  <p>Regarding the model is taking forever, I took the logistics part and ran well!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-23T22:45:53.823Z
Answers.LastActivityDate: 2018-03-24T11:54:36.767Z
Answers.LastEditDate: 2018-03-24T11:54:36.767Z
Answers.UserDisplayName: wgrt
Body: <p>I'm mathematically modeling yellow fever, and yet, after assembling the model, I need to find the stationary states of the model. I had to do it by hand because wolfram software could not get the necessary values. </p>
  
  <p>My question is, how do I check if my stationary states are in line with my biological model? </p>
  
  <p>I was told that there is a way to verify this by performing a substitution of the s values of the points within my own template code. But I have no idea how to do it.</p>
  
  <p>The code used is taking forever to get back to me as this data behaves in my model
      </p>
  
  <pre><code>function ypsir = ypsirtry(t,y)
  betah = .01;
  muh = 0.01;
  sigmah = 0.05;
  alphah = 0.06;
  deltah = 0.05; 
  mui = 0.07;
  mum = 0.07;
  betai = 0.03;
  lambdai = 0.06;
  lambdah = 0.5;
  k = 500;
  
  ypsir = zeros(5,1);
  ypsir(1) = sigmah*y(3) - muh*y(1) - betah*y(1)*y(5) + lambdah*(y(2)+ y(3) + 
  y(1));
  ypsir(2) = -deltah*y(2) - y(2)*(alphah + muh) + betah*y(5)*y(1);
  ypsir(3) = deltah*y(2) - sigmah*y(3);
  ypsir(4) = -mui*y(4) - mum*y(4) - betai*y(2)*y(4) + lambdai*(y(4) + y(5))*(1 
  - (y(4) + y(5))/k);
  ypsir(5) = betai*y(2)*y(4) - mui*y(5) - mum*y(5);
  end
  </code></pre>
  
  <p>Along with this calling program
      </p>
  
  <pre><code>clear;
  to = 0;
  tf =50;
  yo = [99 1 0 1 3];
  [t y] = ode45(@(t,y)ypsirtry(t,y),[to tf],yo); 
  plot(t,y(:,1),t,y(:,2),t,y(:,3),t,y(:,4),t,y(:,5))
  title('First Model of Yellow Fever')
  xlabel('time')
  ylabel('susceptible, infected, recovered,Mosquito Non-carrier, Carrier 
  mosquito') 
  </code></pre>
  
  <p>My stationary states are:
      </p>
  
  <pre><code>S = (1/betai)*[(muh+alphah)+(sigmah/deltah)*deltah]*(mui+mum)/betai*N*I);
  
  I = sigmah*R/deltah;
  
  R = ((muh/betah + lambdah)*(muh+alphah))/(sigmah+lamdah)-(muh+alphah)* 
  (deltah/sigmah*deltah)-(betah/muh - lambdah)*(betai*N*I)* 
  (delta/sigmah*deltah));
  
  N = -k/lambdai((-lamdai+(lambdai/k))*P/-betai*I + lambdai - (2k/lambdai*P)- 
  mui-mum);
  
  P = betai*N*I/(mui+mum); 
  </code></pre>
  
  <p>At where
  S = susceptible
  I = infected
  R = retweeted
  N = non-carrier mosquito
  P = carrier mosquito</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-16T15:46:01.367Z
Comments.Text: I think your question is a good question, but we would need more details in order to answer them. How did you code your model? Which stationary states? (Why do you use the biomart tag?) Which data do you have to verify your models (if it is not purely theoretical)? What do you mean by "performing a schedule" ? You can [edit] it to include this or other information.
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-16T21:09:28.297Z
Comments.Text: I'm already going to make the issues, sorry for the delay! I collared biomat because I thought it would be mathematical modeling in biology. I'm new to the site and I was a little lost on which site to put. I will post the code with the respective data. But when putting it to compile it is dying a lot of time. But I will add other information. Do you know how I can put on latex around here? to make it easier to see formulas in my edits. Sorry English, it is not my mother tongue how can you perceive rs ...
Comments.UserDisplayName: wgrt
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-16T22:31:57.200Z
Comments.Text: Wouldn't it be sufficient to determine this by running it until the system elicits stationary behavior and then comparing the values? If you did that for a variety of values for the constants (`betah` and so on) then that would also be a good test.
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-17T10:25:33.537Z
Comments.Text: @wgrt See the [tour] page to learn about the site and the [help] page to know how it works. How much is a lot of time: 3 days? Do you know if it can be optimized? (I don't know enough matlab to propose it myself). Also you left some questions from my previous comment unanswered
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-17T18:25:38.870Z
Comments.Text: @Llopis You're not going to optimize an RK45 method that's implemented in C much. If this really is slow to compute then presumably there are some very drastic changes in values (RK45 shrinks its steps in such cases).
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-19T10:14:29.467Z
Comments.Text: @DevonRyan sometimes the methods are optimized but one doesn't use them efficiently. Anyway, wgrt: any update?
Comments.UserDisplayName: llrs
Tags: <modelling><matlab>
Title: How to verify if the stationary states of a biological model are correct?
ThreadText: # How to verify if the stationary states of a biological model are correct?
  
  (Asked by: username_0 on 2018-03-16)
  
  I'm mathematically modeling yellow fever, and yet, after assembling the model, I need to find the stationary states of the model. I had to do it by hand because wolfram software could not get the necessary values.
  
  My question is, how do I check if my stationary states are in line with my biological model?
  
  I was told that there is a way to verify this by performing a substitution of the s values of the points within my own template code. But I have no idea how to do it.
  
  The code used is taking forever to get back to me as this data behaves in my model
  
  ```
  function ypsir = ypsirtry(t,y)
  betah = .01;
  muh = 0.01;
  sigmah = 0.05;
  alphah = 0.06;
  deltah = 0.05; 
  mui = 0.07;
  mum = 0.07;
  betai = 0.03;
  lambdai = 0.06;
  lambdah = 0.5;
  k = 500;
  
  ypsir = zeros(5,1);
  ypsir(1) = sigmah*y(3) - muh*y(1) - betah*y(1)*y(5) + lambdah*(y(2)+ y(3) + 
  y(1));
  ypsir(2) = -deltah*y(2) - y(2)*(alphah + muh) + betah*y(5)*y(1);
  ypsir(3) = deltah*y(2) - sigmah*y(3);
  ypsir(4) = -mui*y(4) - mum*y(4) - betai*y(2)*y(4) + lambdai*(y(4) + y(5))*(1 
  - (y(4) + y(5))/k);
  ypsir(5) = betai*y(2)*y(4) - mui*y(5) - mum*y(5);
  end
  
  ```
  
  Along with this calling program
  
  ```
  clear;
  to = 0;
  tf =50;
  yo = [99 1 0 1 3];
  [t y] = ode45(@(t,y)ypsirtry(t,y),[to tf],yo); 
  plot(t,y(:,1),t,y(:,2),t,y(:,3),t,y(:,4),t,y(:,5))
  title('First Model of Yellow Fever')
  xlabel('time')
  ylabel('susceptible, infected, recovered,Mosquito Non-carrier, Carrier 
  mosquito') 
  
  ```
  
  My stationary states are:
  
  ```
  S = (1/betai)*[(muh+alphah)+(sigmah/deltah)*deltah]*(mui+mum)/betai*N*I);
  
  I = sigmah*R/deltah;
  
  R = ((muh/betah + lambdah)*(muh+alphah))/(sigmah+lamdah)-(muh+alphah)* 
  (deltah/sigmah*deltah)-(betah/muh - lambdah)*(betai*N*I)* 
  (delta/sigmah*deltah));
  
  N = -k/lambdai((-lamdai+(lambdai/k))*P/-betai*I + lambdai - (2k/lambdai*P)- 
  mui-mum);
  
  P = betai*N*I/(mui+mum); 
  
  ```
  
  At where
  S = susceptible
  I = infected
  R = retweeted
  N = non-carrier mosquito
  P = carrier mosquito
  
  **Tags:** modelling, matlab
  
  > **Comments:**
  > **username_1**: I think your question is a good question, but we would need more details in order to answer them. How did you code your model? Which stationary states? (Why do you use the biomart tag?) Which data do you have to verify your models (if it is not purely theoretical)? What do you mean by "performing a schedule" ? You can [edit] it to include this or other information.  
  > **username_0**: I'm already going to make the issues, sorry for the delay! I collared biomat because I thought it would be mathematical modeling in biology. I'm new to the site and I was a little lost on which site to put. I will post the code with the respective data. But when putting it to compile it is dying a lot of time. But I will add other information. Do you know how I can put on latex around here? to make it easier to see formulas in my edits. Sorry English, it is not my mother tongue how can you perceive rs ...  
  > **username_2**: Wouldn't it be sufficient to determine this by running it until the system elicits stationary behavior and then comparing the values? If you did that for a variety of values for the constants (`betah` and so on) then that would also be a good test.  
  > **username_1**: @username_0 See the [tour] page to learn about the site and the [help] page to know how it works. How much is a lot of time: 3 days? Do you know if it can be optimized? (I don't know enough matlab to propose it myself). Also you left some questions from my previous comment unanswered  
  > **username_2**: @Llopis You're not going to optimize an RK45 method that's implemented in C much. If this really is slow to compute then presumably there are some very drastic changes in values (RK45 shrinks its steps in such cases).  
  > **username_1**: @username_2 sometimes the methods are optimized but one doesn't use them efficiently. Anyway, username_0: any update?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-03-23. Score: 1
  
  After much analysis of the model, I came to the conclusion that I will not be able to verify how the equilibrium points behave graphically. Since you will have to create a phase diagram in R ^ 5, there are five equations, and I can not do two-to-two comparison in these cases, because I will always have a function that depends on a variable that will not be placed, but will be in the equation plotted anyway.
  
  But in any case, if it were in three dimensions, for the purpose of information for those who are interested, the verification of the points would be to place the points (which in calculating have both numbers and not functions in function of other functions), within the model created, hence plot the phase diagram and check whether the arrows converge or not to the point. If they are converging, they are correct.
  
  Regarding the model is taking forever, I took the logistics part and ran well!
  
  
  ---
  
  