Jump to content


Photo

Specifying parameter conditions at steady state


  • Please log in to reply
2 replies to this topic

#1 Kathryn

Kathryn

    Member

  • Members
  • PipPip
  • 15 posts

Posted 26 February 2013 - 08:50 AM

Using a text-editing PML model, I would like to add a condition concerning the parameters I'm trying to estimate.

I have two sets of observed data, and I want to specify that, at steady state, the concentrations in the two cases are the same. I can obviously do the algebra, setting my differential equations to zero, and substituting/rearranging to come up with one equation containing all of my parameters in this situation.

But how can I specify in the model that the parameter values must fulfil this equation only at steady state?

Here is the code

Obs data 1
deriv(Cmedu = (fucell*Ccell*CLpass - Cmedu*CLpass - Cmedu*CLup)/Vmed)
deriv(Ccell = (Cmedu*CLpass + Cmedu*CLup - fucell*Ccell*CLpass )/Vcell)

Obs data 2
deriv(CmeduIT = (fucell*CcellIT*CLpass - CmeduIT*CLpass )/Vmed)
deriv(CcellIT = (CmeduIT*CLpass - fucell*CcellIT*CLpass )/Vcell)

Conditions at steady state
CLpass = CmeduIT/(Cmedu*(CLpass+CLup))

#2 Emily Colby

Emily Colby

    Advanced Member

  • Members
  • PipPipPip
  • 88 posts

Posted 26 February 2013 - 02:11 PM

One way to try this is to make a parameter that is the amount of time needed to get to steady state. Let's call it tsteadystate. Next, set up a sequence to set the differential equations to the correct values at tsteadystate (rearrange so that we are setting the values for the derivs instead of the values for the parameters). Then your code would look like this

 

 deriv(Cmedu = (fucell*Ccell*CLpass - Cmedu*CLpass - Cmedu*CLup)/Vmed)

 deriv(Ccell = (Cmedu*CLpass + Cmedu*CLup - fucell*Ccell*CLpass )/Vcell)

  deriv(CmeduIT = (fucell*CcellIT*CLpass - CmeduIT*CLpass )/Vmed)

 deriv(CcellIT = (CmeduIT*CLpass - fucell*CcellIT*CLpass )/Vcell)

#...

 sequence{

sleep(tsteadystate);

 Cmedu = CmeduIT/(CLpass*(CLpass+CLup));

 #etc. conditions at steady state defining Cmedu, Ccell, CmeduIT, CcellT

 #end each line in sequence block with semicolon;

}

#...

stparm(tsteadystate = tvtsteadystate)

#...

fixef(tvtsteadystate=c(,144,))

#...



#3 Kathryn

Kathryn

    Member

  • Members
  • PipPip
  • 15 posts

Posted 01 March 2013 - 08:19 AM

Thanks for this idea, I tried it but the model doesn't seem to be able to estimate the parameter tsteadystate, it just uses the initial estimate I give for it (and I've tried various) without even reporting a SD. Have you used this approach successfully? I assume that, if so, it may be a limitation due to my observed data...

 

Also I'm not entirely sure I've understood why the sleep function is used here - I thought it meant that no data would be taken into account before this simulation time - therefore none of my observed data would be actually used?

 

Hopefully you can help me understand this better, thanks in advance

Kathryn






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users