您好,欢迎访问三七文档
zTreeWorkshop:FundamentalsofzTreeJustinEsareyFloridaStateUniversityDepartmentofPoliticalScienceJuly11th,2005WhatiszTree?ZurichToolboxforReadymadeEconomicExperimentsConsistsoftwoprogramszTree(theprogrammingenvironmentandexperimentserver)zLeaf(theclientprogramforsubjects)Designedprimarilyforpublicgoodsgames,structuredbargainingexperiments,posted-offer-marketsanddoubleauctionsWhatYouWillNeedtoPrograminzTreezTreeandzLeafPrograms(zTree.exeandzLeaf.exe)AvailableatzTreeTutorialManual(ztree21tutorial.pdf)A“guidedtour”ofzTree’scapabilities;moreinstructionalzTreeReferenceManual(ztree21ref.pdf)AnorganizedreferenceofzTreecodeReadingstoDoTodayBasicExperimentsandQuestionnaires(Tutorialpp.7-16,77-81)TomorrowRunningExperimentsandRecoveringData(Tutorialpp.83-89)FunctionsandControlStructures(Tutorialpp.17-41)ProgrammingASimplePublicGoodsGameRecalltheideaofaPublicGoodsGame:Somegroupofpeople,sizeN,receiveanendowmentofmoneyEverypersonchoosessomeproportionoftheirendowmenttocontributeTotalcontributionsaremultipliedbyX1,theneveryonereceivesthatamountbackTotalpayoff=(Endowment–Contribution)+(X*TotalContributions)/NOpeningzTreeEsistnichtenglisch!Changingthelanguagesettingwillnotaffectcurrentlyopentreatments.YouneedtoopenanewtreatmenttohavethedefaultssettoEnglish.YoumustchangethelanguagesettingeverytimeyouopenzTree,evenifyourprogramwaswrittenunderthe“English”setting,becauseotherwiseservermessageswilldisplayinGermanwhenyouruntheprogram.SettingLanguagebyDefaultStagesofaSimplePublicGoodsGameSubjectsarebrokenintogroupsofNSubjectsreceivetheirendowmentSubjectsmakeachoiceforcontributionCalculatethesizeofthetotalpubliccontributionandmultiplybyXReportearnings(endowmentkept+shareofthepublicgood)toallsubjects(Repeat?)TerminologyStage:Inanexperiment,onescreendisplayonwhichasubjectcantakeoneorafewactionsTreatment:Arelatedseriesofstagesthroughwhichsubjectspass;canberepeatingSession:AseriesoftreatmentsallperformedonthesamesubjectsinsequenceStagesofaSimplePublicGoodsGameSubjectsarebrokenintogroupsofNSubjectsreceivetheirendowmentSubjectsmakeachoiceforcontributionCalculatethesizeofthetotalpubliccontributionandmultiplybyXReportearnings(endowmentkept+shareofthepublicgood)toallsubjectsBackgroundStageStage1Stage2MoreTerminologyProgram:Asetofproceduresusedtoassignvariables,calculatepayoffs,storeinformation,etc.ActiveScreen:ThescreenonwhichsubjectsseeinformationandmakedecisionsWaitingScreen:A“placeholder”screenthatsubjectsseeaftertheymakedecisionsinastageandarewaitingforothersubjectstofinishthestageStagesofaSimplePublicGoodsGameSubjectsarebrokenintogroupsofNSubjectsreceivetheirendowmentSubjectsmakeachoiceforcontributionCalculatethesizeofthetotalpubliccontributionandmultiplybyXReportearnings(endowmentkept+shareofthepublicgood)toallsubjectsBackgroundStageStage1Stage2programprogramprogramactivescreenactivescreenOrderofExecutionStep1:SettingtheGeneralBackgroundParametersDouble-clickonBackgroundtoshowtheGeneralParametersdialogSetNumberofSubjectstotherightsize(inthiscase,8)SetNumberofGroupstotherightsize(inthiscase,2)SetPracticePeriodsto0(wewilldiscussthislater)SetPayingPeriodsto1(norepetitionsofthetreatment)SettingtheBackgroundParameters(Continued)ExchangerateMosteconomicexperimentsinvolvesomeformofcashrewardTherewardunitwithintheprogram(ExperimentalCurrencyUnits,orECUs)canbedenominateddifferentlythanthecashrewardWeseta1ECU=$1(or“1Franc”)exchangerate–subjectsseetheirrealpayoffsduringtheexperimentLumpSumPayment:ECUsyougivethesubjectthatcanchangeduringtheexperiment(a“bankroll”)Show-upFee:Dollars/Francsthatarepaidattheendoftheexperiment(XEFSstandardis$10)Step2:SetNon-GeneralBackgroundParametersfortheExperimentThinkaboutwhatvariableparameterswehaveinthisexperiment…thenumberofsubjects(gen.background)thenumberofperiods(gen.background)X–the“efficiencyfactor”thesizeoftheendowmentSettheseinalistatthetopoftheprogram–makesthemeasytochangefordifferenttreatmentsCreateaProgramtoStoretheVariablesPlacecursoronSessionSelectNewProgramfromtheTreatmentmenuCreatingaNewProgramUnderTableselectSubjectsCreatetwovariablenamesforXandtheEndowmentSyntax:variablename={number};PressOKAbout“Tables”ofVariableszTreestoresvariablesinseveraldifferenttables:Subjects–holdsvariablesthatmaybedifferentbetweensubjectsandbetweenperiods(mostreliable)Globals–holdsvariablesthatwillbethesameforallsubjectsbutmaydifferbetweenperiods(havehadtroublewiththisinthepast)Summary–likethesubjectstable,butusedtodisplayrunningstatisticsofanexperimentfortheexperimenterontheserverContracts–holdsbuyand/orselloffersinauctionsSession–holdsvariablesthatmaydifferacrosssubjectsbutpersistsacrosstreatmentsInmostcases,theSubjectstableisappropriateStep3:AskSubjectsforContributionsPlacecursoronBackgroundSelectNewStagefromtheTreatmentmenuCreatingaNewStageGivethestageaname,like“Contribution”UndertheStartmenu,selectWaitforall(sothatallsubjectsenterstagetogether)LeaveAtmostone…unchecked(u
本文标题:ztree教程课件
链接地址:https://www.777doc.com/doc-7413807 .html