⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 joinby.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 22feb2005}{...}
{cmd:help joinby} {right:dialog:  {bf:{dialog joinby}}}
{hline}

{title:Title}

{p2colset 5 19 21 2}{...}
{p2col :{hi:[D] joinby} {hline 2}}Form all pairwise combinations within groups{p_end}
{p2colreset}{...}


{title:Syntax}

{p 8 16 2}
{cmd:joinby} [{varlist}] {helpb using} {it:filename} 
[{cmd:,} {it:options}] 

{synoptset 21 tabbed}{...}
{synopthdr}
{synoptline}
{syntab :Options}
{synopt :When observations match:}{p_end}
{synopt :{opt update}}replace missing data in memory with values from
{it:filename}{p_end}
{synopt :{opt replace}}replace all data in memory with values from
{it:filename}{p_end}

{synopt :When observations do not match:}{p_end}
{synopt :{opt unm:atched}{cmd:(}{opt n:one}{cmd:)}}ignore all; the default{p_end}
{synopt :{opt unm:atched}{cmd:(}{opt b:oth}{cmd:)}}include from both datasets{p_end}
{synopt :{opt unm:atched}{cmd:(}{opt m:aster}{cmd:)}}include from data in
memory{p_end}
{synopt :{opt unm:atched}{cmd:(}{opt u:sing}{cmd:)}}include from data in
{it:filename}{p_end}

{synopt :{opth _merge(varname)}}{it:varname} marks source of resulting
observation; default is {opt _merge}{p_end}
{synopt :{opt nol:abel}}do not copy value label definitions from
{it:filename}{p_end}
{synoptline}
{p2colreset}{...}


{title:Description}

{pstd}
{cmd:joinby} joins, within groups formed by {varlist}, observations of
the dataset in memory with {it:filename}, a Stata-format dataset.  By
join we mean to form all pairwise combinations.  {it:filename} is required
to be sorted by {it:varlist}.  If {it:filename} is specified without an
extension, {cmd:.dta} is assumed.

{pstd}
If {varlist} is not specified, {cmd:joinby} takes as {it:varlist} the set of
variables common to the dataset in memory and in {it:filename}.

{pstd}
Observations unique to one or the other dataset are ignored unless 
{opt unmatched()} specifies differently.  Whether you load one dataset and
join the other or vice versa makes no difference in terms of the number of
resulting observations.

{pstd}
If there are common variables between the two datasets, however, the
combined dataset will contain the values from the master data for those
observations.  This behavior can be modified with the {opt update} and 
{opt replace} options. 


{title:Options}

{dlgtab:Options}

{phang}
{opt update} varies the action that {cmd:joinby} takes when an observation is
matched.  By default, values from the master data are retained when the same
variables are found in both datasets.  If {opt update} is specified, however,
the values from the using dataset are retained where the master dataset
contains missing.

{phang}
{opt replace}, allowed with {opt update} only, specifies that nonmissing
values in the master dataset be replaced with corresponding values from the
using dataset.  A nonmissing value, however, will never be replaced with a
missing value.

{phang}
{opt unmatched}{cmd:(}{opt none}|{opt both}|{opt master}|{opt using}{cmd:)}
specifies whether observations unique to one of the datasets are to be kept,
with the variables from the other dataset set to missing.  Valid values are

{p 12 22 2}
{opt none}{space 4}ignore all unmatched observations (default){p_end}
{p 12 22 2}
{opt both}{space 4}include unmatched observations from the master and using data
{p_end}
{p 12 22 2}
{opt master}{space 2}include unmatched observations from the master data{p_end}
{p 12 22 2}
{opt using}{space 3}include unmatched observations from the using data

{phang}
{opth _merge(varname)} specifies the name of the variable that will mark the
source of the resulting observation.  The default name is {cmd:_merge(_merge)}.
To preserve compatibility with earlier versions of {cmd:joinby}, 
{cmd:_merge} is only generated if {cmd:unmatched} is specified.

{phang}
{cmd:nolabel} prevents Stata from copying the value-label definitions from the
dataset on disk into the dataset in memory.  Even if you do not specify this
option, label definitions from the disk dataset do not replace label
definitions already in memory.

{title:Example}

    {cmd:. joinby famid using children}

    {cmd:. joinby using children}{right:(join on all common variables)  }


{title:Also see}

{psee}
Manual:  {bf:[D] joinby}

{psee}
Online:  {helpb append}, {helpb cross}, {helpb fillin}, 
{helpb merge}, {helpb save}
{p_end}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -