實(shí)驗(yàn)經(jīng)濟(jì)學(xué)軟件ztree教程課件_第1頁(yè)
實(shí)驗(yàn)經(jīng)濟(jì)學(xué)軟件ztree教程課件_第2頁(yè)
實(shí)驗(yàn)經(jīng)濟(jì)學(xué)軟件ztree教程課件_第3頁(yè)
實(shí)驗(yàn)經(jīng)濟(jì)學(xué)軟件ztree教程課件_第4頁(yè)
實(shí)驗(yàn)經(jīng)濟(jì)學(xué)軟件ztree教程課件_第5頁(yè)
已閱讀5頁(yè),還剩227頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

zTreeWorkshop:

FundamentalsofzTreeJustinEsareyFloridaStateUniversityDepartmentofPoliticalScienceJuly11th,2005zTreeWorkshop:

FundamentalsWhatiszTree?ZurichToolboxforReadymadeEconomicExperimentsConsistsoftwoprogramszTree(theprogrammingenvironmentandexperimentserver)zLeaf(theclientprogramforsubjects)Designedprimarilyforpublicgoodsgames,structuredbargainingexperiments,posted-offer-marketsanddoubleauctionsWhatiszTree?ZurichToolboxfWhatYouWillNeedtoPrograminzTreezTreeandzLeafPrograms(zTree.exeandzLeaf.exe)Availableat/faculty/Sunder/ExperimentalEconomics/ExpEcon.htmlzTreeTutorialManual(ztree21tutorial.pdf)A“guidedtour”ofzTree’scapabilities;moreinstructionalzTreeReferenceManual(ztree21ref.pdf)AnorganizedreferenceofzTreecodeWhatYouWillNeedtoProgramReadingstoDoTodayBasicExperimentsandQuestionnaires(Tutorialpp.7-16,77-81)TomorrowRunningExperimentsandRecoveringData(Tutorialpp.83-89)FunctionsandControlStructures(Tutorialpp.17-41)ReadingstoDoTodayProgrammingASimplePublicGoodsGameRecalltheideaofaPublicGoodsGame:Somegroupofpeople,sizeN,receiveanendowmentofmoneyEverypersonchoosessomeproportionoftheirendowmenttocontributeTotalcontributionsaremultipliedbyX>1,theneveryonereceivesthatamountbackTotalpayoff=(Endowment–Contribution)+(X*TotalContributions)/NProgrammingASimplePublicGoOpeningzTreeEsistnichtenglisch!OpeningzTreeEsistnichtengChangingthelanguagesettingwillnotaffectcurrentlyopentreatments.YouneedtoopenanewtreatmenttohavethedefaultssettoEnglish.YoumustchangethelanguagesettingeverytimeyouopenzTree,evenifyourprogramwaswrittenunderthe“English”setting,becauseotherwiseservermessageswilldisplayinGermanwhenyouruntheprogram.ChangingthelanguagesettingSettingLanguagebyDefaultSettingLanguagebyDefaultStagesofaSimplePublicGoodsGameSubjectsarebrokenintogroupsofNSubjectsreceivetheirendowmentSubjectsmakeachoiceforcontributionCalculatethesizeofthetotalpubliccontributionandmultiplybyXReportearnings(endowmentkept+shareofthepublicgood)toallsubjects(Repeat?)StagesofaSimplePublicGoodTerminologyStage:Inanexperiment,onescreendisplayonwhichasubjectcantakeoneorafewactionsTreatment:Arelatedseriesofstagesthroughwhichsubjectspass;canberepeatingSession:AseriesoftreatmentsallperformedonthesamesubjectsinsequenceTerminologyStage:InanexperiStagesofaSimplePublicGoodsGameSubjectsarebrokenintogroupsofNSubjectsreceivetheirendowmentSubjectsmakeachoiceforcontributionCalculatethesizeofthetotalpubliccontributionandmultiplybyXReportearnings(endowmentkept+shareofthepublicgood)toallsubjectsBackgroundStageStage1Stage2StagesofaSimplePublicGoodMoreTerminologyProgram:Asetofproceduresusedtoassignvariables,calculatepayoffs,storeinformation,etc.ActiveScreen:ThescreenonwhichsubjectsseeinformationandmakedecisionsWaitingScreen:A“placeholder”screenthatsubjectsseeaftertheymakedecisionsinastageandarewaitingforothersubjectstofinishthestageMoreTerminologyProgram:AsetStagesofaSimplePublicGoodsGameSubjectsarebrokenintogroupsofNSubjectsreceivetheirendowmentSubjectsmakeachoiceforcontributionCalculatethesizeofthetotalpubliccontributionandmultiplybyXReportearnings(endowmentkept+shareofthepublicgood)toallsubjectsBackgroundStageStage1Stage2programprogramprogramactivescreenactivescreenStagesofaSimplePublicGoodOrderofExecutionOrderStep1:SettingtheGeneralBackgroundParametersDouble-clickonBackgroundtoshowtheGeneralParametersdialogSetNumberofSubjectstotherightsize(inthiscase,8)SetNumberofGroupstotherightsize(inthiscase,2)SetPracticePeriodsto0(wewilldiscussthislater)SetPayingPeriodsto1(norepetitionsofthetreatment)Step1:SettingtheGeneralBaSettingtheBackgroundParameters(Continued)ExchangerateMosteconomicexperimentsinvolvesomeformofcashrewardTherewardunitwithintheprogram(ExperimentalCurrencyUnits,orECUs)canbedenominateddifferentlythanthecashrewardWeseta1ECU=$1(or“1Franc”)exchangerate–subjectsseetheirrealpayoffsduringtheexperimentLumpSumPayment:ECUsyougivethesubjectthatcanchangeduringtheexperiment(a“bankroll”)Show-up

Fee:Dollars/Francsthatarepaidattheendoftheexperiment(XEFSstandardis$10)SettingtheBackgroundParametStep2:SetNon-GeneralBackgroundParametersfortheExperimentThinkaboutwhatvariableparameterswehaveinthisexperiment…thenumberofsubjects(gen.background)thenumberofperiods(gen.background)X–the“efficiencyfactor”thesizeoftheendowmentSettheseinalistatthetopoftheprogram–makesthemeasytochangefordifferenttreatmentsStep2:SetNon-GeneralBackgrCreateaProgramtoStoretheVariablesPlacecursoronSessionSelectNewProgramfromtheTreatmentmenuCreateaProgramtoStoretheCreatingaNewProgramUnderTableselectSubjectsCreatetwovariablenamesforXandtheEndowmentSyntax:variablename={number};PressOKCreatingaNewProgramUnderTa實(shí)驗(yàn)經(jīng)濟(jì)學(xué)軟件ztree教程課件About“Tables”ofVariableszTreestoresvariablesinseveraldifferenttables:Subjects–holdsvariablesthatmaybedifferentbetweensubjectsandbetweenperiods(mostreliable)Globals–holdsvariablesthatwillbethesameforallsubjectsbutmaydifferbetweenperiods(havehadtroublewiththisinthepast)Summary–likethesubjectstable,butusedtodisplayrunningstatisticsofanexperimentfortheexperimenterontheserverContracts–holdsbuyand/orselloffersinauctionsSession–holdsvariablesthatmaydifferacrosssubjectsbutpersistsacrosstreatmentsInmostcases,theSubjectstableisappropriateAbout“Tables”ofVariableszTrStep3:AskSubjectsforContributionsPlacecursoronBackgroundSelectNewStagefromtheTreatmentmenuStep3:AskSubjectsforContrCreatingaNewStageGivethestageaname,like“Contribution”UndertheStartmenu,selectWaitforall(sothatallsubjectsenterstagetogether)LeaveAtmostone…unchecked(usedtomakechoicessequential)UnderLeavestageaftertimeout,selectNo(makestimelimitnon-binding)UnderTimeout,select30(seconds)CreatingaNewStageGivethesCreatingaScreenforSubjectstoEnterContributionPlacecursoronActiveScreenSelectNewBox→StandardBoxfromtheTreatmentmenuCreatingaScreenforSubjectsTerminologyBox:AcontainerinwhichtextdisplaysandentrybuttonsareplacedontheActiveScreenTerminologyBox:AcontainerinCreatingaNewBox1234567CreatingaNewBox1234567LegendofBoxCreationScreenLabelofthebox(notshowntosubjects)Sizeofthebox,inpointsorpercentoftheremainingscreenDistanceawayfromthe(remaining)screenedgeinpointsorpercentAdjustmentoftheremainingbox(whetherto“cutoff”thescreenabove,below,totheleft,ortotherightofthecurrentboxDisplayCondition(ifpresent,Booleanexpressionthatmustbetrueinorderforboxtobeshown)ButtonPosition(wheretoplacebuttonsinthisbox)Arrangement(howtoarrangebuttons)LegendofBoxCreationScreenL實(shí)驗(yàn)經(jīng)濟(jì)學(xué)軟件ztree教程課件FinishingCreationofTheBoxFinishingCreationofTheBoxPuttinganItemintotheBoxPlacecursoronContributionEntrySelectNewItemfromtheTreatmentmenuPuttinganItemintotheBoxPlCreatingtheTexttoDisplayCreatingtheTexttoDisplayWaystoDisplayInformationinanItemWaystoDisplayInformationinFinishingtheItemText:ATitleBoxFinishingtheItemText:ATitANewItem:ShowingtheEndowmentANewItem:ShowingtheEndowmTheFinalItem:AnInputBoxforContributionTheFinalItem:AnInputBoxfAButtontoEndtheStagePlacecursoronthelastitemunderActiveScreenSelectNewButtonfromtheTreatmentmenuSetthebuttonasshownAButtontoEndtheStagePlace實(shí)驗(yàn)經(jīng)濟(jì)學(xué)軟件ztree教程課件Step3:CalculatePublicGoodCreateanewstage,callit“DisplayOutcomes”Highlightthenewstage,thencreateanewprogramEnterthiscodeintotheprogram:Pgood=Efficiencyfactor*sum(same(Group),Contribution);Notethiscommand:sum(same(Group),Contribution)–thistellsthecomputertosumupthevariable“Contribution”foreveryoneinthesameGroupStep3:CalculatePublicGoodCMoreProgramsCreateanotherprogramunderthelastone,andenterthefollowingcode:N=count(same(Group));ThiscommandtellsthecomputertocountthenumberofpeoplewiththesamegroupnumberCreateanewprogramunderthelastone,andenterthiscodein:Profit=Pgood/N+(Endowment–Contribution);Note:ProfitisareservedvariablenamethatzTreeusestorecordtheamountpaidtoasubject(inECUs)ineveryperiodProgramsMUSTbeseparate:youcannotuseavariablecreatedbyaprograminanotherexpressionuntiltheprogramhasbeencompletelyexecutedMoreProgramsCreateanotherpr實(shí)驗(yàn)經(jīng)濟(jì)學(xué)軟件ztree教程課件Step4:DisplayOutcomesCreateanewStandardbox,callit“FinalOutcome”SettheboxtotakeuptheentirescreenAdditemstothebox:PlaceatitleontheresultsDisplaytheamountthesubjectkeptDisplaytheamountofthesubject’sowncontributionDisplaythetotalcontributionofthegroupDisplaythesubject’sshareofthecontributionDisplaythefinalearningsofthesubjectPutabuttonintoleavethestageStep4:DisplayOutcomesCreate實(shí)驗(yàn)經(jīng)濟(jì)學(xué)軟件ztree教程課件SetGroupMatchingProtocolSelectTreatment→ParameterTableSelectallofthecellscorrespondingtothedifferentsubjectsinPeriod1SelectTreatment→Matching→StrangerSetGroupMatchingProtocolSelThat’sIt!SavethefileusingFile→SaveWearenowreadytorunanexperimentThat’sIt!SavethefileusingSuggestedHomeworkTrymodifyingtoday’sprogramintoa“CommonPoolResource”Game(Ostrometal.APSRarticle,“CovenantsWithandWithoutaSword”)8agentshaveagivennumberofworkhoursinaday(say,10)andcanallocatethembetweenharvestingacommonpoolresource(x)andleisure(10-x)CPRyieldsdiminishingreturnstoincreasinglyintenseharvestingPayoff=x*(23X-0.25X^2)+5(10-x),whereX=sum(x)overallsubjectsSuggestedHomeworkTrymodifyinQuestionnairesQuestionnairesQuestionnairesYoumustrunaquestionnaireattheendofanexperimentinordertoretrievethedatafromthatexperimentQuestionnairescanbesimple,justnamesandsocialsecuritynumbers,orinvolvemorecomplicatedsurveysToday,wewilldoasimpleexampleofaquestionnaireandshowmorecomplicatedexampleslaterQuestionnairesYoumustrunaqCreateaQuestionnaireGotoFile→NewQuestionnaireDouble-clickon“Adress”(theGermanspellingofAddress,Ithink)CreateaQuestionnaireGotoFiBasicQuestionsinQuestionnaire

Questionsleftblankwillnotbeaskedtothesubjects.Labelonthe“OK”ButtonWhatyouenterintotheblankwillcorrespondtowhattheheaderontheanswerblankwillread;forexample,youcanusethe“PostalCode”blanktogatherinformationaboutSocialSecurityNumbersBasicQuestionsinQuestionnaiAddingaFinalDisplayScreenSelect(single-click)“Adress”,thengotoQuestionnaire→NewQuestionFormYoucanadditemstothisquestionform,justlikeyoudowithaboxinanormaltreatmentTypicalitemstodisplaymightinclude:ThevariableFinalProfit–totalearningsfromtheexperiment,notincludingtheshow-upfeeThevariableShowUpFeeCreateitems(withlabels)todisplaythesevariablesAddingaFinalDisplayScreenSTheFinalQuestionnaireTheFinalQuestionnaireRunningaSessionRunningaSessionRunninganExperimentOpenzTreeandTreatmentFilesontheExperimenterServerMakesurelanguageissetcorrectlySetMatchingprotocol(ifnecessary)OpenzLeafoneverySubjectcomputerMakesurelanguageandnamesaresetupcorrectlyonzLeafprogramsChecktomakesureclientsareconnectedRunexperimenttreatmentsMonitorSubjectstableandClientstableRunquestionnaire;readPaymentfilesCollectdataandsplittablesRunninganExperimentOpenzTrezTree’sAdvantage:EasyNetworkingAllyouneedtodoisopenzTreeontheexperimenterPCfirst,thenopenzLeafoneachclientPCMakesurethat,inthesamedirectoryaszLeaf,thereisanotepadfilecalledserver.eecwiththeIPaddressoftheservercomputeronitzTree’sAdvantage:EasyNetworSettingLanguageandNameonzLeafCreateashortcuttothezLeafoneachSubjectclientIntheTargetblank,putin:/Name<thedesiredname>PutinadifferentnameforeachSubjectclientcomputersothatyoucantellthemapartSettingLanguageandNameonzVerifyingthatClientsareConnected:TheClientsTableVerifyingthatClientsareConEightClients(NamedCorrectly)AreConnectedtothisServerEightClients(NamedCorrectlyStartingtheTreatmentStartingtheTreatmentMonitorSubjectProgressTheClientstableandtheSubjectstableprovidemostoftheimportantinformationMonitorSubjectProgressTheClOpeningtheSubjectsTableOpeningtheSubjectsTableCurrentStagethatSubjectisinTimeRemaininginStageVariableValuesforEachSubjectInformationinClientandSubjectTablesCurrentStagethatSubjectisStartingtheQuestionnaireStartingtheQuestionnaireThe“Adress”FormShownThe“Adress”FormShownThePaymentFileOnceeverysubjecthasfinishedthequestionnaire(asyoucanmonitorintheClientstable)apaymentfilewillbewrittenOpenthisfileinExceltoseepayoffsThePaymentFileOnceeverysubPaymentFileDetailsPaymentFileDetailsCollectingandOrganizingtheDatazTreenamesfilesaccordingtodateplusarandomcode:YYMMDDCC.xxxY=Year,M=Month,D=Day,C=codeSeveralfilesareofinterestSubjectfile:.sbj(Questionnaireanswersstoredhere)Gamesafe:.gsf(InternalzTreeStorage)CollectedTables:.xls(VariablesfromTreatment)CollectingandOrganizingtheSplitTables/TreatmentsApartClosezTreeMakesurezTreeisreallyclosed(useCtrl-Alt-DeleteandcloseanyinstancesofzTreeRe-openzTree,selectTools→SeparateTablesSelectthe.xlsfilefromthelasttreatmentSplitTables/TreatmentsApartCNewFilesCreatedTreatmentNumberTableNameNewFilesCreatedTreatmentNumSampleTreatmentRunOnyourdesktop,createashortcuttozLeafCallit/Name<number>,whereIgiveyouthenumberSampleTreatmentRunOnyourdeHowcanyoutestprogramsonyourown?OpenyourtreatmentwithzTreeOpenasmanyzLeafShortcutsonyourowncomputerasnecessarytorunthetreatmentNamethemdifferentlytohelpdifferentiatethemRuntreatmentinzTreeasnormal,switchingamongzLeafs(usingAlt-Tab)tomakeentriesHowcanyoutestprogramsonyMoreComplicatedPrograms:FunctionsandSimpleControlStatementsMoreComplicatedPrograms:FunGuesstheSineFunctionGuesstheSineFunctionzTreeImplementsManyMathematicalFunctionszTreeImplementsManyMathematzTreealsoImplementsMany“Table”FunctionszTreealsoImplementsMany“TaAnotherExample:A“GuesstheAverage”GameAnotherExample:A“GuesstheTheScopeOperatorWithinTablesTheScopeOperatorWithinTablTheScopeOperatorBetweenTablesSupposethattheaboveprogramisbeingexecutedintableA,andthatthereisavariablevpresentintablesA,B,andCNotethatthesyntaxB.function()executedintableAdrawsvariablesfromtableBforexecution;thescopeoperatormovestheexecutiontothenexthighertableTheScopeOperatorBetweenTabTechniques:RankingSubjectsGivesubjectsarank–tiesgotoalowernumberGivesubjectsarank–tiesgotoahighernumberInthecaseofatie,rewardsubjectaccordingtotheir“average”rankTechniques:RankingSubjectsGiRankingSubjects&theScopeOperatorAsthefunctionworksthrougheachlineofthetable,comparethevalueofDiffforeachsubjectinthetabletothevalueofDiffforthesubjectonthislineRankingSubjects&theScopeOProgramminginGroupMatchingAutomaticallyUsingaFunctionRanksubjectsaccordingtoarandomvariable,thenassignthemintogroupsaccordingtotheirranksProgramminginGroupMatchingTheScopeOperatorBetweenTablesTableATableBTableCTheScopeOperatorBetweenTabConditionalExecutionofProgramsYoucanwriteprogramssuchthatstatementsareexecutedonlyifcertainconditionsaretrueConditionIfcisTrue,dothisIfcisFalse,dothis(optional)ConditionalExecutionofProgrExampleofConditionalExecutionInthiscase,thevalueofthevariablepiscontingentontheperiodandtheidentityofthesubjectExampleofConditionalExecutiComparisonSymbols(ifiscasesensitive)if(x==y)IfxisequaltoyMUSTbetwosignsif(x==y&x==z)If“xequalsy”AND“xequalsz”arebothtrueif(x==y|x==z)Ifeither“xequalsy”O(jiān)R“xequalsz”aretrueif(x!=y)IfxisNOTequaltoyif(x>y)Ifxisgreaterthanyif(x<=y)IfxislessthanorequalyComparisonSymbols(ifiscaseEntireProgramsandDisplayBoxesCanAlsobeConditionalEntireProgramsandDisplayBoParticipationinaStagecanbeConditionalParticipationinaStagecanbMoreComplicatedPrograms:DisplayOptionsMoreComplicatedPrograms:DisRecallItemLayoutsInsideofBoxesRecallItemLayoutsInsideofLayoutOptionsLayoutOptionsIn-ClassExerciseStartwithgame222.zttTasks:MaketheChoiceVariableabinaryradiobuttonchoiceOnlyshowthefinalprofitdisplaytothefirstsubjectIn-ClassExerciseStartwithgaMoreComplicatedItemLayouts:DisplayingVariablesinTextVariableoutputscanbedisplayedinthe“l(fā)abel”portionofalabellayoutInthe“l(fā)abel”portionoftheitembox,entercodethatlookssomethinglikethis:TellsprogramthattherewillbeembeddedvariablesinthistextRegulartextEmbeddedVariableVariablenameLayoutMoreComplicatedItemLayouts:AnExampleofEmbeddingVariablesAnExampleofEmbeddingVariabDouble-EmbeddingofVariablesThisdisplaysthevalueofProfitifpositiveandthetext“negative”ifitisnegativeYoucouldhaveputthevariablenameProfitinthedouble-embedding(andIalwaysdo),butinthiscaseitisnotnecessaryDouble-EmbeddingofVariablesTFontSizeandFormattinginLabelsLabelformattingiscontrolledusingRTFtags(richtextformatting)WhatwillDisplayCodeFontSizeandFormattinginLaExampleofRTFFormatting:BankruptcyWarningExampleofRTFFormatting:BanEmbeddedVariablesandRTFFormattingTagsEmbeddedVariablesandRTFForNon-StandardBoxesNon-StandardBoxesGrid

BoxesGrid

BoxesHelp

BoxesHelp

BoxesHistoryBoxesHistoryBoxesContainerBoxesAContainerboxholdsother,smallerboxesUseittoeasilyorganizeotherboxesContainerBoxesAContainerboxContainerboxesdividethescreenintocolumns;boxesintheContainerdividethecolumnintocells;oneitemisplacedintoeachboxExample:UsingContainerBoxesContainerboxesdividethescrMoreComplicatedPrograms:ArraysandIteratorsMoreComplicatedPrograms:ArrStoringVectorszTreecanstorevectorsofvaluesbycreatingarrayobjectsValuesforelementsofthearrayareassignedusingthissyntax:arrayname[i]=1;StoringVectorszTreecanstoreArraysandIteratorFunctionsArrayscanbeusedinconjunctionwithiteratorfunctionsinordertoquicklyassignaseriesofvaluesIteratorsrepeatedlyexecuteaportionofaprogram,incrementingthevalueofavariableasitgoesIteratorstatementsmustbeappendedtootherfunctions,like“sum”or“do”usingasyntaxlikeiterator(i,10).sum(arrayname[i],v)ArraysandIteratorFunctionsAExampleofIteratorSyntaxUsedwithArraysExampleofIteratorSyntaxUseThingszTreeCannotdoWithArraysStorematrices(orarraysthathaveotherarraysaselements)DomatrixmultiplicationorothermatrixoperationsThingszTreeCannotdoWithArMoreComplicatedPrograms:StoringPastHistoriesMoreComplicatedPrograms:StoStoringInformationFromPreviousPeriodsSometimes,youmaywishtopresenthistoricalinformationfrompreviousperiodstosubjectsTheproblem:zTreeonlyremembersthevalueofavariableoneperiodpriorThesepreviousvaluesarestoredinatablecalledOLDtable;so,thepreviousvariablesinthesubjectstablecanbecalledfromthetablecalledOLDsubjectsStoringInformationFromPreviHowCanYouMaintainaHistoryLongerthanOnePeriod?Attheendofthetreatment,insertaprogramliketheoneatleft;thisprogrammovesvaluesfrommultipleperiodsagointosequentialboxes,finallydiscardingthemafter4periodsHistory1History2History3History4CurrentValue1PeriodAgo2PeriodsAgo3PeriodsAgo4PeriodsAgo5PeriodsAgoHowCanYouMaintainaHistoryHistories,ContinuedCreatinghistorieswithmultiplestorageboxesmeansthatzTree’saccesstooneperiodworthofhistoryissufficientPutthefollowingprogramatthebeginningofthetreatment:iterator(i,14).do{}Histories,ContinuedCreatinghMoreComplicatedPrograms:PopupWindowsBetweenStagesMoreComplicatedPrograms:PopPausesandPromptsInProgramsSupposeyouwantaprogramtopauseandbringupamessagetotheexperimenterbetweenphasesinanexperiment.Whatdoyoudo?OpentheParameterTable

thatweusedforParameterMatchingbeforePausesandPromptsInProgramsParameterTableDoubleclickonthePeriodnumberatthebeginningofwhichyouwantthecomputertopauseParameterTableDoubleclickonPeriodPrompts:TheDialogBoxPeriodPrompts:TheDialogBoxIn-ClassAssignmentWorkwithsomepre-programmedtreatmentsIwroteforexperimentalprogramsGroupedPublicGoods(AhnIsaacandSalmon)EndogenousTaxChoice(BarrilleauxEsareyandSalmon)EndogenousNetworkCreation(AhnEsareyandScholz)In-ClassAssignmentWorkwithszTreeWorkshop:

FundamentalsofzTreeJustinEsareyFloridaStateUniversityDepartmentofPoliticalScienceJuly11th,2005zTreeWorkshop:

FundamentalsWhatiszTree?ZurichToolboxforReadymadeEconomicExperimentsConsistsoftwoprogramszTree(theprogrammingenvironmentandexperimentserver)zLeaf(theclientprogramforsubjects)Designedprimarilyforpublicgoodsgames,structuredbargainingexperiments,posted-offer-marketsanddoubleauctionsWhatiszTree?ZurichToolboxfWhatYouWillNeedtoPrograminzTreezTreeandzLeafPrograms(zTree.exeandzLeaf.exe)Availableat/faculty/Sunder/ExperimentalEconomics/ExpEcon.htmlzTreeTutorialManual(ztree21tutorial.pdf)A“guidedtour”ofzTree’scapabilities;moreinstructionalzTreeReferenceManual(ztree21ref.pdf)AnorganizedreferenceofzTreecodeWhatYouWillNeedtoProgramReadingstoDoTodayBasicExperimentsandQuestionnaires(Tutorialpp.7-16,77-81)TomorrowRunningExperimentsandRecoveringData(Tutorialpp.83-89)FunctionsandControlStructures(Tutorialpp.17-41)ReadingstoDoTodayProgrammingASimplePublicGoodsGameRecalltheideaofaPublicGoodsGame:Somegroupofpeople,sizeN,receiveanendowmentofmoneyEverypersonchoosessomeproportionoftheirendowmenttocontributeTotalcontributionsaremultipliedbyX>1,theneveryonereceivesthatamountbackTotalpayoff=(Endowment–Contribution)+(X*TotalContributions)/NProgrammingASimplePublicGoOpeningzTreeEsistnichtenglisch!OpeningzTreeEsistnichtengChangingthelanguagesettingwillnotaffectcurrentlyopentreatments.YouneedtoopenanewtreatmenttohavethedefaultssettoEnglish.YoumustchangethelanguagesettingeverytimeyouopenzTree,evenifyourprogramwaswrittenunderthe“English”setting,becauseotherwiseservermessageswilldisplayinGermanwhenyouruntheprogram.ChangingthelanguagesettingSettingLanguagebyDefaultSettingLanguagebyDefaultStagesofaSimplePublicGoodsGameSubjectsarebrokenintogroupsofNSubjectsreceivetheirendowmentSubjectsmakeachoiceforcontributionCalculatethesizeofthetotalpubliccontributionandmultiplybyXReportearnings(endowmentkept+shareofthepublicgood)toallsubjects(Repeat?)StagesofaSimplePublicGoodTerminologyStage:Inanexperiment,onescreendisplayonwhichasubjectcantakeoneorafewactionsTreatment:Arelatedseriesofstagesthroughwhichsubjectspass;canberepeatingSession:AseriesoftreatmentsallperformedonthesamesubjectsinsequenceTerminologyStage:InanexperiStagesofaSimplePublicGoodsGameSubjectsarebrokenintogroupsofNSubjectsreceivetheirendowmentSubjectsmakeachoiceforcontributionCalculatethesizeofthetotalpubliccontributionandmultiplybyXReportearnings(endowmentkept+shareofthepublicgood)toallsubjectsBackgroundStageStage1Stage2StagesofaSimplePublicGoodMoreTerminologyProgram:Asetofproceduresusedtoassignvariables,calculatepayoffs,storeinformation,etc.ActiveScreen:ThescreenonwhichsubjectsseeinformationandmakedecisionsWaitingScreen:A“placeholder”screenthatsubjectsseeaftertheymakedecisionsinastageandarewaitingforothersubjectstofinishthestageMoreTerminologyProgram:AsetStagesofaSimplePublicGoodsGameSubjectsarebrokenintogroupsofNSubjectsreceivetheirendowmentSubjectsmakeachoiceforcontributionCalculatethesizeofthetotalpubliccontributionandmultiplybyXReportearnings(endowmentkept+shareofthepublicgood)toallsubjectsBackgroundStageStage1Stage2programprogramprogramactivescreenactivescreenStagesofaSimplePublicGoodOrderofExecutionOrderStep1:SettingtheGeneralBackgroundParametersDouble-clickonBackgroundtoshowtheGeneralParametersdialogSetNumberofSubjectstotherightsize(inthiscase,8)SetNumberofGroupstotherightsize(inthiscase,2)SetPracticePeriodsto0(wewilldiscussthislater)SetPayingPeriodsto1(norepetitionsofthetreatment)Step1:SettingtheGeneralBaSettingtheBackgroundParameters(Continued)ExchangerateMosteconomicexperimentsinvolvesomeformofcashrewardTherewardunitwithintheprogram(ExperimentalCurrencyUnits,orECUs)canbedenominateddifferentlythanthecashrewardWeseta1ECU=$1(or“1Franc”)exchangerate–subjectsseetheirrealpayoffsduringtheexperimentLumpSumPayment:ECUsyougivethesubjectthatcanchangeduringtheexperiment(a“bankroll”)Show-up

Fee:Dollars/

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論