Professional Documents
Culture Documents
Data preparation
Ourobjectivehereistomodel(andforecast)theeffectivenessofthenewchemicalusingdifferent dosages,andexplain,tosomeextent,anyvariationbasedonthegenderofthebudworm.Furthermore, wewanttoexpresstheresultsintermofthewormmortalityrates(i.e.probability). Batch 1 2 3 4 5 6 7 8 9 10 11 12 Dose 1 2 4 8 16 32 1 2 4 8 16 32 Gender 0 0 0 0 0 0 1 1 1 1 1 1 Death 1 4 9 13 18 20 0 2 6 10 12 16 Rate 5.0% 20.0% 45.0% 65.0% 90.0% 100.0% 0.0% 10.0% 30.0% 50.0% 60.0% 80.0% 1 SpiderFinancialCorp,2012
TutorialGLM(BinomialDistribution)
P f ( X , Y ) E[ p | X , Y ]
Modeling
Wearereadynowtoproposeastatisticalmodel:generalizedlinearmodelwithresidualsfollowingthe Binomialdistribution. UsingNumXLtoolbar,clickontheGLMicon.
TutorialGLM(BinomialDistribution) 2 SpiderFinancialCorp,2012
TheGLMwizardwillpopup.Initially,allthecontrolsaredisableduntilwespecifyavalidrangefor responseandexplanatoryvariables.Thenumberofrowsofthetwocellsrangesmustmatch.
TutorialGLM(BinomialDistribution)
SpiderFinancialCorp,2012
Calibration
Inthiscase,theGLMWizardhascalibratedthemodelscoefficients,sowecanskipthisstep. But,intheeventwewishtoexperimentwithdifferentlinkfunctions:LOGIT,PROBITorLOGLOG,then weneedtorecalibratethemodel.Todoso,wecaneither: (1) Createanewmodelwiththewizard,or, (2) ChangetheLvkparameterinanexistingmodeltable,andrunthecalibrationusingNumXL toolbar.
Step 1: Select the cell that acts as a header for the model table
TutorialGLM(BinomialDistribution)
SpiderFinancialCorp,2012
Forecast
Oncethemodeliscalibrated,andwearehappywiththeresiduals,wecanuseittoconstructour forecastmean(andconfidenceintervalaroundit). UsingNumXLfunction(GLM_FORE),wecancomputethemean.UsingGLM_FORECI,wecancompute theupperandlowerlimitoftheconfidenceinterval.
Plottingthedataagain(actual)versusthemodelvalues.
TutorialGLM(BinomialDistribution)
SpiderFinancialCorp,2012
TutorialGLM(BinomialDistribution)
SpiderFinancialCorp,2012