Help with model calibration

Use this forum to post Vensim related questions.
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

Do you have a link I can follow to format the data? I know how to format it if treatment was not included
Treatment ID Events mileage
1 1
1 1
1 1
1 2
1 2
1 2
0 3
0 3
0 3
0 4
0 4
0 4
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Help with model calibration

Post by Administrator »

leon wrote:I was asking how to format the data. Remember we used subscripts for driver ID. There is a new variable treatment and drivers are categorized by treatment group. How to format the data taking into account treatment group?
I've got no knowledge of what you did before with drivers.

Can you format it in the same way you did before?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

Please, take a look a this format. Will it work? I will have to do everything over again

Dear Tomfid, please advise. I need your help so badly
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

Here is the format.
Attachments
Data outline.xlsx
(8.66 KiB) Downloaded 192 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Help with model calibration

Post by Administrator »

What happens when you try and import it?

There are examples in the Vensim help system on how to import data into Vensim, have you looked at these?

You imply that you've already imported data from Excel, why not do the same thing again?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Help with model calibration

Post by tomfid »

I think this should import just fine.
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

Hi Tomfid,
Could you please look at what is going wrong with this model? I removed all the previous subscripts and wanted to re-assign the new subscripts including subscripts for the treatment group, but for some reason I could not see the model anymore. All I'm seeing is just equations.
I prepared the data for the control and intervention group and wanted load them into the model
Attachments
Teen_Driver_Model.mdl
(6.14 KiB) Downloaded 196 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Help with model calibration

Post by Administrator »

Try this.
Teen_Driver_Model.mdl
(6.07 KiB) Downloaded 252 times
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

How did you do it? Is not working on my computer. All it's showing is equations
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Help with model calibration

Post by tomfid »

Try View>As Sketch
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

Okay, thanks so much. Let me try that
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

When I tried View>Sketch, I got this error. I don't why it's not working
Attachments
doc.docx
(40.82 KiB) Downloaded 180 times
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

Do you have any ideas of what could be the problem? Is it working on your computer?
Attachments
Teen_Driver_Model.mdl
(6.14 KiB) Downloaded 190 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Help with model calibration

Post by Administrator »

What is the problem? They are warnings, it's still running.

And no, I cannot run it as I don't have any of the other files needed for it.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

Sorry I did not know you needed other files. I removed some files before I zipped the rest because it was too big to send.
I'm trying to assign subscripts, it's not even letting me do it. It's saying error.
Let me know if you have every file you need to run it
Attachments
Driver11.zip
(406.3 KiB) Downloaded 184 times
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

Hi Tomfid,
I'm sorry, but I want to bother you again. Could you review the model for me?
I'm not sure the set up is correct for treatment, you suggested a switch 0-1.
Also, should I assign the parameters estimated from the optimization of the control data?
My understanding is payoff = - cost (minus cost) and the policy variable to optimize would be the effect of treatment.

I deleted all my previous files and models, and built the model from scratch again. After that, I was able to import the data. All the data are loaded, both control and treatment.

Thanks so much
Attachments
Optimization.zip
(4.13 KiB) Downloaded 150 times
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

Dear Tomfid, please I need your help so badly.
The deadline to submit my draft is this coming Saturday.
Your help is greatly appreciated..
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Help with model calibration

Post by Administrator »

Can you get help from your tutor as this is thesis work isn't it? They should be the first person you contact.

To review a model takes a long time, and I know Tom is travelling at the moment so it's unlikely he will have the time to conduct a review.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

The thesis member who can help does not use vensim, making it hard to get help from him. He has downloaded the PLE, but can't run the model because it has subscripts.
When is he coming back?
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Help with model calibration

Post by Administrator »

Maybe it would be better if you asked smaller simple questions. Not many people have the time to review complete models (which could easily take a a few days, especially if someone is unfamiliar with the subject being modelled).
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

That's true.
1) Treatment in my model is binary (0, 1). If I want to calibrate a subset of my data (for example, treatment=0), is there anyway I can specify that in the model?
2) I'm trying to optimize the variable treatment. I have no idea how to do it. Tom has given a general idea about optimization, but I need the technical part
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Help with model calibration

Post by Administrator »

leon wrote:1) Treatment in my model is binary (0, 1). If I want to calibrate a subset of my data (for example, treatment=0), is there anyway I can specify that in the model?
Have you prepared the sub-set of data? If yes, calibrate to that instead of the full set.
leon wrote:2) I'm trying to optimize the variable treatment. I have no idea how to do it. Tom has given a general idea about optimization, but I need the technical part
Have you looked at the optimization examples in the Vensim documentation? They are straightforward and easy to understand, start with those and then apply the same principles to your model.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

I mean if I want to conduct a stratified calibration by treatment (treatment 0/1), is there a way I can tell Vensim to calibration a subset of data for which treatment=0?
The challenge for my model is the subscripts. Could you share the links your for policy optimization? I saw a policy optimization about sales in your help section, but it was not very help
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Help with model calibration

Post by tomfid »

I think you want to calibrate everything at once, not as separate subsets.

So, you need:
- a dataset like the existing one, but including all drivers
- one additional variable, "treatment" that takes value 0 or 1

The treatment flag could be a constant, or a data variable if some drivers were subject to treatment for only part of the time.

I'd guess that most of the parameters remain unchanged, except "fraction known" which becomes something like,
fraction known[driver] = base fraction known + effect of treatment*treatment[driver]
leon
Senior Member
Posts: 192
Joined: Tue Feb 21, 2017 11:11 pm
Vensim version: PRO

Re: Help with model calibration

Post by leon »

Thanks Tom.
Is cost per event a parameter to be estimated?
The intervention cost is 140$+(40$/month)=340$ for 5 months. How to express the unit cost of intervention?
Is calibration synonym of policy optimization?
Post Reply