fake_panel: Generate a panel of firm sales data.

Description Usage Arguments Value Examples

View source: R/fake_data.R

Description

This function generates a panel (“'tbl“') of firm sales.

Usage

1
2
fake_panel(N, T, I = 2, mean_sales = 30, sd_sales = 0.1 * mean_sales,
  model = list(order = c(1, 1, 1), ar = 0.1, ma = 0.1), missing = 0)

Arguments

N

The number of individuals

T

The number of time periods

I

The number of industries

mean_sales

Cross-section mean of sales, in millions of $

sd_sales

Cross-section standard deviation of sales

model

Arima model arguments; a list of order = c(AR order, degree of differencing, MA order), ar = (AR parameter), ma = (MA parameter)

missing

A number between 0 and 1; the fraction of the sample that should be missing at random

Value

A tbl of panel data

Examples

1
2
3
fake_panel(N = 10000, T = 50)

fake_panel(N = 10, T = 20, missing = 0.2)

tweed1e/fakedata documentation built on May 29, 2019, 10:51 a.m.