您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 其它行业文档 > limdep-nlogit使用说明
1NLOGITBasicsI.AViewoftheDesktopWhenyoustartNLOGIT,yourdesktopwillappearasfollows:(The‘commandwindow’belowtherowofbuttonsmaynotbepresent.Toinstallit,clickTools:Options:Viewthenclickinthecheckboxnextto‘DisplayCommandBar’andfinally,clickOK.Thissettingispermanentuntilyouchangeit.)ClickherefortheFile:NewmenuHINT:Donotever‘close’thiswindow.Youmusthaveaprojectwindowopenfortheotherfunctionsoftheprogramtooperate.NLOGITusesastandardWindowsstylestatisticalpackage,threewindowmodeofoperation.Thefirstwindowyouwillseeiscalledthe‘project’window.Aprojectconsistsofthedatayouareanalyzingandtheresultsofyourcomputations,suchasestimatesofcoefficients,othermatricesyoumighthavecomputed,andsoon.Aswe’llseeshortly,thiswindowcontainsaninventoryofthethingsyouhavecomputed-thatinventorywillgrowasyoumanipulateyourdata.Thesecondmainwindowthatyouwilluseisthe‘editingwindow.’ThiswillbetheplacewhereyouputyourinstructionstoNLOGITAswithanyWindowsprogram,NLOGITmakesuseofmanymenusanddialogboxes.However,youwillfindatsomepointquitesoonthatthemenusaretooslowforwhatyouwishtodo,andyouwillswitchtoacommandformatinwhichyoutypeoutyourinstructionstogettheprogramtodocomputationssuchasregressions.We’lldemonstrateshortly.OpenaneditingwindowbyclickingFile:Newtoopena2itemdialogbox.TheitemhighlightedisText/Commanddocument,whichiswhatyouwant,sojustclickOKtoopentheeditingwindow.ThiswillusuallybeyourfirststepafteryoustartNLOGITYourdesktopwillappearasbelowafteryouopenyoureditingwindow.2YouwilltypeyourcommandsinthiswindowThiswindowisthe‘input’window.YouarenowreadytostartusingNLOGITtoanalyzedataordoothercomputations.Youwillputyourinstructionsinthiswindow.Whenyou(theprogram)carryouttheinstructions,thenumericalresultswillappearinthethirdmainwindow,the‘output’window.Theoutputwindowiscreatedautomaticallyforyouwhenyouissueacommand.We’lllookatanexamplebelow.Therewillbemanyother‘transient’windowsthatyouwillopenandclose.Forexample,whenyouproduceaplotorusematrixalgebratoproducearesult,orwhenyouenterdatabyreadingaspreadsheet,youwilluseoneoranothersortofwindowwhichyouwillopen,thenprobablycloseasyoumoveontoyournextcomputationoroperation.Thethreeprimarywindows,project,input,andoutput,willusuallystayopenonthedesktopatalltimes.Nodoubtyouwillsizethemandmovethemaroundtoarrangethedesktopinawayyouprefer.II.AShortDemonstrationWe’rereadytogetstarted.Beforeworkingthroughanorganized‘minimanual,’let’sillustrateoperationoftheprogrambycarryingoutasmallapplicationfrombeginningtoend.Thetablebelowlistsasmalldataset,thefamousLongleydata..YearGNPINVSCPIi1968873.4133.382.545.161969944.0149.386.795.871970992.7144.291.455.9519711077.6166.496.014.8819721185.9195.0100.004.5019731326.4229.8105.756.4419741434.2228.7115.087.8319751549.2206.1125.796.2519761718.0257.9132.345.5019771918.3324.1140.055.4619782163.9386.6150.427.4619792417.8423.0163.4210.2819802633.1402.3178.6411.7719812937.7471.5195.5113.4219823057.5421.9207.2311.02Ourfirststepisputthesedataintheprograminaplacewherewecanusethem.Therearemanywaystodothis,includingimportingfromanotherprogram,suchasMicrosoftExcel.We’llbeginfromscratch,andtypethemindirectly.(Thiswilltakeafewminutes,butitwillfamiliarizeyouwithanimportantpartofNLOGIT.)Thebuttonsecondfromtherightatthetopofyourscreen(withagridicon)activatesthedataeditor.Whenyoufirstactivateit,thedataeditorisempty.Youwishtoputfivenewvariablesinit.Step1,then,istopresstherightmousebuttontoactivateamenuwhichwillcreateacolumnforyoutoputdataonavariableinto.3Thisbuttonactivatesthedataeditor.NewVariable...ImportVariables...ExportVariables...SortVariable...SetSampleSplitWindowSelectthisitemtocreateanewvariableintheproject.PresstherightmousebuttontoactivatethismenuWhenyouselect‘NewVariable,’adialogboxwillappear.Thisboxallowsyoutocreateacolumninyourspreadsheetforavariable.We’vetypedthenameYEARinthenamefield.Then,pressOK-thereisnoneedtoenteraformula-thoughyoucanifyouwish.PressOKafteryouenterthenameofthenewvariable.Youcandefineaformulaforatransformedvariableinthiswindow.Thisisalistofthemathematicalfunctionsthatareavailablefortransformationsofvariables.Hint:Ifyoupressthisbutton,youwillactivatetheHelpfeature.Thisopenstheelectronicmanual.Werepeatthisforeachofour5variables.Thedataeditorwillbereformattedasagrid,andweenterthedataonourfivevariables.Theendresultappearsasfollows:4Usetheusualeditingkeys,↑,↓,→.←,Enter,Backspace,andsoontomovearoundthisspreadsheetstyledataeditor.Entervaluesasyouwouldinanyspreadsheetprogram.Whenyouaredoneenteringdata,justclosethewindowbyclicking×.Or,justminimizeit,incaseyouwanttocomebacklater.Hint:Thiswindowisupdatedautomatically.Allvariablesthatexistareinthiswindowatalltimes,regardlessofhoworwhentheyarecreated.Beforemovingontotheanalysis,weclosethedataeditorbydoubleclickingthegridiconattheupperleftofclickingthe‘×’boxattheupperrightoftheeditor(notthetopmostone,whichclosesthewholeprogram).Wenowhavefivevariablesinourproject.Noticethattheprojectwindowhaschangedtoreflectthis:Theoriginalprojectwindowthatcameupwhenwestartedshowednothingnexttothe‘Variables’item.Now,byclickingthe‘+’boxnextto‘Variables,’w
本文标题:limdep-nlogit使用说明
链接地址:https://www.777doc.com/doc-5248020 .html