marginallet美人3
let美人3 时间:2021-01-15 阅读:(
)
Titlestata.
commkspline—LinearandrestrictedcubicsplineconstructionDescriptionQuickstartMenuSyntaxOptionsRemarksandexamplesStoredresultsMethodsandformulasAcknowledgmentReferencesAlsoseeDescriptionmksplinecreatesvariablescontainingalinearsplineorarestrictedcubicsplineofanexistingvariable.
Forlinearsplines,knotscanbeuserspecied,equallyspacedovertherangeofthevariable,orplacedatpercentiles.
Forrestrictedcubicsplines,alsoknownasnaturalsplines,knotlocationsarebasedonHarrell's(2001)recommendedpercentilesoruser-speciedpoints.
QuickstartLinearsplineofv1withknotsat30,40,and50mksplineknot130knot240knot350knot4=v1Addknotsat20and60mksplineknot120knot230knot340knot450knot560knot6=v1Deneknotsbyquintilesmksplineknot5=v1,pctileAsabove,butapplyfrequencyweightwvarbeforecalculatingquintilesmksplineknot5=v1[fweight=wvar],pctileRestrictedcubicsplineofv2withdefault5knotsmksplineknot=v2,cubicAsabove,butplaceknotsat30,40,and50mksplineknot=v2,cubicknots(30,40,50)MenuData>Createorchangedata>Othervariable-creationcommands>Linearandcubicsplineconstruction12mkspline—LinearandrestrictedcubicsplineconstructionSyntaxLinearsplinewithknotsatspeciedpointsmksplinenewvar1#1[newvar2#2newvark=oldvarifin,marginaldisplayknotsLinearsplinewithknotsequallyspacedoratpercentilesofdatamksplinestubname#=oldvarifinweight,marginalpctiledisplayknotsRestrictedcubicsplinemksplinestubname=oldvarifinweight,cubicnknots(#)knots(numlist)displayknotsfweightsareallowedwiththesecondandthirdsyntax;see[U]11.
1.
6weight.
OptionsOptionsmarginalisallowedwiththerstorsecondsyntax.
Itspeciesthatthenewvariablesbeconstructedsothat,whenusedinestimation,thecoefcientsrepresentthechangeintheslopefromtheprecedinginterval.
Thedefaultistoconstructthevariablessothat,whenusedinestimation,thecoefcientsmeasuretheslopesfortheinterval.
displayknotsdisplaysthevaluesoftheknotsthatwereusedincreatingthelinearorrestrictedcubicspline.
pctileisallowedonlywiththesecondsyntax.
Itspeciesthattheknotsbeplacedatpercentilesofthedataratherthanbeingequallyspacedovertherange.
nknots(#)isallowedonlywiththethirdsyntax.
Itspeciesthenumberofknotsthataretobeusedforarestrictedcubicspline.
Thisnumbermustbebetween3and7unlesstheknotlocationsarespeciedusingknots().
Thedefaultnumberofknotsis5.
knots(numlist)isallowedonlywiththethirdsyntax.
Itspeciestheexactlocationoftheknotstobeusedforarestrictedcubicspline.
Thevaluesoftheseknotsmustbegiveninincreasingorder.
Whenthisoptionisomitted,thedefaultknotvaluesarebasedonHarrell'srecommendedpercentileswiththeadditionalrestrictionthatthesmallestknotmaynotbelessthanthefth-smallestvalueofoldvarandthelargestknotmaynotbegreaterthanthefth-largestvalueofoldvar.
Ifbothnknots()andknots()aregiven,theymustspecifythesamenumberofknots.
Remarksandexamplesstata.
comRemarksarepresentedunderthefollowingheadings:LinearsplinesRestrictedcubicsplinesmkspline—Linearandrestrictedcubicsplineconstruction3LinearsplinesLinearsplinesallowestimatingtherelationshipbetweenyandxasapiecewiselinearfunction,whichisafunctioncomposedoflinearsegments—straightlines.
Onelinearsegmentrepresentsthefunctionforvaluesofxbelowx0,anotherlinearsegmenthandlesvaluesbetweenx0andx1,andsoon.
Thelinearsegmentsarearrangedsothattheyjoinatx0,x1,whicharecalledtheknots.
Anexampleofapiecewiselinearfunctionisshownbelow.
Example1Wewishtotamodeloflogincomeoneducationandagebyusingapiecewiselinearfunctionforage:lninc=b0+b1educ+f(age)+uTheknotsaretobeplacedat10-yearintervals:20,30,40,50,and60.
.
usehttps://www.
stata-press.
com/data/r16/mksp1.
mksplineage120age230age340age450age560age6=age,marginal.
regresslninceducage1-age6(outputomitted)Becausewespeciedthemarginaloption,wecouldtestwhethertheageeffectisthesameinthe30–40and40–50intervalsbyaskingwhethertheage4coefcientiszero.
Withthemarginaloption,coefcientsmeasurethechangeinslopefromtheprecedinggroup.
Specifyingmarginalchangesonlytheinterpretationofthecoefcients;thesamemodelistineithercase.
Withoutthemarginaloption,theinterpretationofthecoefcientswouldhavebeendydage=a1ifage00,ifu≤0Withouttheknots()option,thelocationsoftheknotsaredeterminedbythepercentilesrec-ommendedinHarrell(2001,23).
Thesepercentilesarebasedonthechosennumberofknotsasfollows:No.
ofknotsPercentiles3105090453565955527.
55072.
59565234159779572.
518.
3334.
175065.
8381.
6797.
5Harrellprovidesdefaultpercentileswhenthenumberofknotsisbetween3and7.
Whenusinganumberofknotsoutsidethisrange,thelocationoftheknotsmustbespeciedinknots().
AcknowledgmentTherestrictedcubicsplineportionofmksplineisbasedonthercsplinecommandbyWilliamDupontoftheDepartmentofBiostatisticsatVanderbiltUniversity.
ReferencesHarrell,F.
E.
,Jr.
2001.
RegressionModelingStrategies:WithApplicationstoLinearModels,LogisticRegression,andSurvivalAnalysis.
NewYork:Springer.
Newson,R.
B.
2012.
Sensibleparametersforunivariateandmultivariatesplines.
StataJournal12:479–504.
Orsini,N.
,andS.
Greenland.
2011.
Aproceduretotabulateandplotresultsafterexiblemodelingofaquantitativecovariate.
StataJournal11:1–29.
Alsosee[R]fp—Fractionalpolynomialregression
美国服务器哪家平台好?美国服务器无需备案,即开即用,上线快。美国服务器多数带防御,且有时候项目运营的时候,防御能力是用户考虑的重点,特别是网站容易受到攻击的行业。现在有那么多美国一年服务器,哪家的美国云服务器好呢?美国服务器用哪家好?这里推荐易探云,有美国BGP、美国CN2、美国高防、美国GIA等云服务器,线路优化的不错。易探云刚好就是做香港及美国云服务器的主要商家之一,我们来看一下易探云美国云服...
提速啦简单介绍下提速啦 是成立于2012年的IDC老兵 长期以来是很多入门级IDC用户的必选商家 便宜 稳定 廉价 是你创业分销的不二之选,目前市场上很多的商家都是从提速啦拿货然后去分销的。提速啦最新物理机活动 爆炸便宜的香港CN2物理服务器 和 日本CN2物理服务器香港CTG E5 2650 16G内存 20M CN2带宽 1T硬盘 150元/月日本CN2 E5 2650 16G内存 20M C...
柚子互联官网商家介绍柚子互联(www.19vps.cn)本次给大家带来了盛夏促销活动,本次推出的活动是湖北十堰高防产品,这次老板也人狠话不多丢了一个6.5折优惠券而且还是续费同价,稳撸。喜欢的朋友可以看看下面的活动详情介绍,自从站长这么久以来柚子互联从19年开始算是老商家了。六五折优惠码:6kfUGl07活动截止时间:2021年9月30日客服QQ:207781983本次仅推荐部分套餐,更多套餐可进...
let美人3为你推荐
域名注册商如何成为一个域名注册商呀me域名注册.me是什么域名虚拟主机购买虚拟主机哪里购买的好?中文域名注册查询中文域名注册怎么查询便宜的虚拟主机免费、便宜的虚拟主机哪里有?要好用的 ,速度快的免费vps服务器免费服务器有哪些海外域名我想了解一下“国内域名”,“国外域名”以及“海外服务器”这三个方面的一些知识asp网站空间说ASP空间是做网站的空间是啥意思?什么是虚拟主机虚拟主机是什么国内最好的虚拟主机国内虚拟主机哪家的好?
香港虚拟空间 成都虚拟空间 东莞服务器租用 免费linux主机 鲁诺vps 泛域名解析 新网域名管理 GGC bluehost tier 鲨鱼机 日志分析软件 网通服务器ip 论坛空间 网盘申请 彩虹ip 免费ftp空间申请 网站挂马检测工具 上海域名 我爱水煮鱼 更多