




版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
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實驗經(jīng)濟學軟件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實驗經(jīng)濟學軟件ztree教程課件FinishingCreationofTheBoxFinishingCreationofTheBoxPuttinganItemintotheBoxPlacecursoronContributionEntrySelectNewItemfromtheTreatmentmenuPuttinganItemintotheBoxPlCreatingtheTexttoDisplayCreatingtheTexttoDisplayWaystoDisplayInformationinanItemWaystoDisplayInformationinFinishingtheItemText:ATitleBoxFinishingtheItemText:ATitANewItem:ShowingtheEndowmentANewItem:ShowingtheEndowmTheFinalItem:AnInputBoxforContributionTheFinalItem:AnInputBoxfAButtontoEndtheStagePlacecursoronthelastitemunderActiveScreenSelectNewButtonfromtheTreatmentmenuSetthebuttonasshownAButtontoEndtheStagePlace實驗經(jīng)濟學軟件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實驗經(jīng)濟學軟件ztree教程課件Step4:DisplayOutcomesCreateanewStandardbox,callit“FinalOutcome”SettheboxtotakeuptheentirescreenAdditemstothebox:PlaceatitleontheresultsDisplaytheamountthesubjectkeptDisplaytheamountofthesubject’sowncontributionDisplaythetotalcontributionofthegroupDisplaythesubject’sshareofthecontributionDisplaythefinalearningsofthesubjectPutabuttonintoleavethestageStep4:DisplayOutcomesCreate實驗經(jīng)濟學軟件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. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 江西省南昌市2025屆高三下學期4月模擬檢測(二模)語文試卷及參考答案
- 北京臨川學校2025屆高三4月教學質量檢測試題(二模)(文+理)數(shù)學試題
- 《人民科學家的精神風采》課件
- 2025年朝陽下載貨運從業(yè)資格證模擬考試題
- 減肥行業(yè)現(xiàn)象研究報告
- 幼兒園各類預案
- 舉辦2025年社區(qū)八一建軍節(jié)活動主題方案
- 基于tms320f280049設計的簡單電路
- 二零二五版授予虛擬股合同
- 二零二五版房屋租賃主體變更三方合同
- 廣東省廣州市白云區(qū)2024-2025學年高三下學期2月統(tǒng)測英語試卷【含答案解析】
- 2023-2024學年廣東省廣州市天河區(qū)八校聯(lián)考七年級(下)期中數(shù)學試卷(含答案)
- deepseek的使用技巧與實際應用培訓課件
- 禁食病人護理措施
- 存款保險知識競賽
- 信息技術必修1數(shù)據(jù)與計算2.2《做出判斷的分支》教學設計
- 七年級生物上冊 3.2.1 種子的萌發(fā)說課稿1 (新版)新人教版
- 2025年春季中小學升旗儀式安排表(附:1-20周講話稿)
- 2025年臨床醫(yī)師定期考核必考復習題庫及答案(1000題)
- 2024年中國男式印花T-恤衫市場調查研究報告
- 保安指揮車輛標準手勢培訓
評論
0/150
提交評論