Page 12 of 15

Re: Help with model calibration

Posted: Tue Sep 19, 2017 8:10 pm
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

Re: Help with model calibration

Posted: Wed Sep 20, 2017 7:11 am
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?

Re: Help with model calibration

Posted: Wed Sep 20, 2017 12:41 pm
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

Re: Help with model calibration

Posted: Wed Sep 20, 2017 12:43 pm
by leon
Here is the format.

Re: Help with model calibration

Posted: Wed Sep 20, 2017 3:48 pm
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?

Re: Help with model calibration

Posted: Thu Sep 21, 2017 5:32 pm
by tomfid
I think this should import just fine.

Re: Help with model calibration

Posted: Fri Sep 22, 2017 2:32 pm
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

Re: Help with model calibration

Posted: Fri Sep 22, 2017 2:45 pm
by Administrator
Try this.
Teen_Driver_Model.mdl
(6.07 KiB) Downloaded 264 times

Re: Help with model calibration

Posted: Fri Sep 22, 2017 3:34 pm
by leon
How did you do it? Is not working on my computer. All it's showing is equations

Re: Help with model calibration

Posted: Fri Sep 22, 2017 3:54 pm
by tomfid
Try View>As Sketch

Re: Help with model calibration

Posted: Fri Sep 22, 2017 4:03 pm
by leon
Okay, thanks so much. Let me try that

Re: Help with model calibration

Posted: Fri Sep 22, 2017 4:36 pm
by leon
When I tried View>Sketch, I got this error. I don't why it's not working

Re: Help with model calibration

Posted: Fri Sep 22, 2017 5:35 pm
by leon
Do you have any ideas of what could be the problem? Is it working on your computer?

Re: Help with model calibration

Posted: Fri Sep 22, 2017 5:40 pm
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.

Re: Help with model calibration

Posted: Fri Sep 22, 2017 7:23 pm
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

Re: Help with model calibration

Posted: Sat Sep 23, 2017 3:45 pm
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

Re: Help with model calibration

Posted: Mon Sep 25, 2017 12:42 pm
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..

Re: Help with model calibration

Posted: Mon Sep 25, 2017 2:50 pm
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.

Re: Help with model calibration

Posted: Mon Sep 25, 2017 3:07 pm
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?

Re: Help with model calibration

Posted: Mon Sep 25, 2017 4:57 pm
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).

Re: Help with model calibration

Posted: Mon Sep 25, 2017 5:25 pm
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

Re: Help with model calibration

Posted: Mon Sep 25, 2017 5:49 pm
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.

Re: Help with model calibration

Posted: Mon Sep 25, 2017 6:00 pm
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

Re: Help with model calibration

Posted: Mon Sep 25, 2017 7:27 pm
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]

Re: Help with model calibration

Posted: Mon Sep 25, 2017 8:07 pm
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?