Learn R Programming

fwildclusterboot (version 0.3.4)

create_data: Simulate Data

Description

Function simulates data for tests and examples with clustering variables and fixed-effects.

Usage

create_data(N, N_G1, icc1, N_G2, icc2, numb_fe1, numb_fe2, seed, weights)

Arguments

N

number of observations

N_G1

A scalar. number of clusters for clustering variable 1

icc1

A scalar between 0 and 1. intra-cluster correlation for clustering variable 1

N_G2

A scalar. number of clusters for clustering variable 2

icc2

A scalar between 0 and 1. intra-cluster correlation for clustering variable 2

numb_fe1

A scalar. Number of fixed effect for first factor variable

numb_fe2

A scalar. Number of fixed effect for second factor variable

seed

An integer. Set the random seed

weights

Possible regression weights to be used in estimation

Value

A simulated data.frame with specified numbers of clusters, intra-cluster correlations and dimensionality of fixed effects.