Outputs:
SQL: [IDI_Community].[pent_type].[type_202510]
SAS: libname cm_type dsn=IDI_community_srvprd schema=pent_type; run ;
How to access a code module in the Data Lab: Read here
Inputs:
| Dependency | Dependency Type |
|---|---|
[IDI_Adhoc].[clean_read_IR].[pent_IDI_202510_rfabling] |
Source |
[LBD_Adhoc].[dbo].[pent_bal_ind_idi_202510] |
Source |
[LBD_Clean].[lbf_clean].[fact_lbf_enterprise_year] |
Source |
Context
This module creates a table of permanent enterprises with the business type and institutional sector.
Business type refers to the legal status of the enterprise. e.g., individual proprietorship, partnership, limited liability company, trust. Business owners choose the legal structure they prefer, with implications for eg. their tax liability, legal rights and obligations, means of accessing finance, and administrative requirements.
Institutional sectors are a grouping of units with a similar role in the economy and which are expected to have similar responses to market, fiscal and monetary policy levers. There are five broad economic sectors which make up the economy: (1) non-financial businesses; (2) financial businesses; (3) general government; (4) non-profit institutions serving households; and (5) households. A sector for the rest of the world (6), exists for transactions between New Zealand resident units and non-residents (eg, to identify the offshore parent company of an enterprise that operates in New Zealand).
Operational Definition
Information on business type and institutional sector is available in the LBF. The 1996 Stats NZ business type standard classification has 15 classifications of business types such as sole-proprietorships, partnerships, and limited liability companies. The reference table [IDI_Metadata].[clean_read_CLASSIFICATIONS].[br_business_type96] shows the classifications.
The classifications for Institutional sector refer to the Statistical Classification for Institutional Sectors 1996, and are available in [IDI_Metadata].[clean_read_CLASSIFICATIONS].[br_inst_sector96].
Researchers are often interested primarily in private-for-profit (PFP) firms. Fabling and Mare (2015, 2019) provide an indicator of “always PFP”, based on a combination of institutional sector and business type [pent_bal_ind_idi_yyyymm_rfabling].
Key Notes
-
The private-for-profit definition excludes business type codes above 6, institutional sector codes other than 1111,1121,1311,1321,2211,2221, 2291,2311,2411 (private producer enterprises, central and local government enterprises, and private financial institutions), and ANZSIC06 codes beginning with O and S96 (Government and Defence).
-
Can use [IDI_Metadata].[clean_read_CLASSIFICATIONS].[br_business_type96] and [IDI_Metadata].[clean_read_CLASSIFICATIONS].[br_inst_sector96] in left joins as a source of text descriptions of business type and institutional sector.
References & Contacts
- Fabling, R., & Mare, D. C. (2015). Production function estimation using New Zealand’s Longitudinal Business Database. Motu Working Paper 15-15. September 2015.
- Fabling, R., & Sanderson, L. (2016). A Rough Guide to New Zealand’s Longitudinal Business Database 2nd Ed. Motu Working Paper 16-03. February 2016.
- Fabling, R., & Mare, D. C. (2019). Improved productivity measurement in New Zealand’s Longitudinal Business Database. Motu Working Paper 19-03. April 2019.
Community of Interest
| Who | Involvement |
|---|---|
| Lynda Sanderson | Lead Subject Matter Expert |
| Joe Bancolita | Initial draft of the code |
| Corey Allen | Contributor |
| Christopher Bell | Contributor |
| Rodney Jer | Contributor |
| Jeroen Kole | Contributor |
| Samuel Mortlock | Contributor |
| Guanyu “Fish” Zheng | Contributor |
Parameters
The following parameters should be supplied to this module to run it in the database:
- {targetdb}: The SQL database on which the module dataset is to be created.
- {targetschema}: The project schema under the target database into which the module dataset is to be created.
- {lbdcleanversion}: The LBD refresh where the module will be based upon.
- {penttbldate}: Version date of the labour tables to be used in YYYYMM.
Variable Descriptions
| Aspect | Variables | Description |
|---|---|---|
| Entity | pent | The Permanent Enterprise Number of the firm. See Fabling (2011). |
| Period | dim_year_key | Financial year (aligned to closest March year, in YYYY03). |
| Event information | business_type96_code | 1996 Statistics New Zealand business type code that gives the legal status of the enterprise/firm. |
| inst_sector96_code | 1996 Statistics New Zealand institutional sector code that is a heirarchical classification which groups together enterprises who play a similar role in the economic process, and who can be expected to have similar reactions to market, fiscal and monetary policy stimuli. | |
| always_pfp | Indicator = 1 if firm is always private-for-profit (= 0 otherwise, NULL if institutional sector or business type always NULL on BR). |
Module Version & Change History
| Date | Version Comments |
|---|---|
| 1-Sep-22 | L Sanderson - v0 Base Code |
| 1-Oct-22 | J Bancolita - Revisions, parameterisation |
| 19-Jan-24 | T Van Loenhout - Streamlining and documenting for modular code |
| 11-Mar-25 | T Van Loenhout - Updating the source path locations |
Code
/* Set Parameters */
/*PARAMETERS
SQLCMD only (Activate by clicking Query->SQLCMD Mode)
*/
:setvar targetdb "{targetdb}"
:setvar targetschema "{targetschema}"
:setvar lbdcleanversion "{lbdcleanversion}"
:setvar penttbldate "{penttbldate}"
/* Delete the database object if it already exists */
DROP TABLE IF EXISTS [$(targetdb)].[$(targetschema)].[type];
SELECT pent.pent
, lbf.dim_year_key
, lbf.business_type96_code
, lbf.inst_sector96_code
, always_pfp = bal.always_private_for_profit
INTO [$(targetdb)].[$(targetschema)].[type]
FROM [IDI_Adhoc].[clean_read_IR].[pent_IDI_$(penttbldate)_rfabling] pent
INNER JOIN [$(lbdcleanversion)].[lbf_clean].[fact_lbf_enterprise_year] lbf
ON pent.enterprise_nbr = lbf.enterprise_nbr
AND lbf.dim_year_key BETWEEN pent.start_month AND pent.end_month
LEFT JOIN [LBD_Adhoc].[dbo].[pent_bal_ind_idi_$(penttbldate)] bal
ON pent.pent = bal.pent
;