Learn R Programming

plmm (version 0.1-1)

plmm.data: Data Set for the Package Examples

Description

plmm.data is a data.frame of simulated, hierarchically structured (2-level) data used in examples provided in the package documents.

Usage

data(plmm.data)

Arguments

Format

A data frame with 363 observations on the following 9 variables.
y0
a numeric vector of the response simulated with one covariate for the nonparametric component under homoskedastic regression error assumption.
y1
a numeric vector of the response simulated with one covariate for the nonparametric component under heteroskedastic regression error assumption.
y2
a numeric vector the response simulated with two covariates for the nonparametric component under homoskedastic regression error assumption.
x1
a factor with levels {F, M}.
x2
a numeric vector of a covariate in the fixed parametric component.
x3
a numeric vector of a covariate in the fixed parametric component.
t1
a numeric vector of a covariate in the fixed nonparametric component.
t2
a numeric vector of a covariate in the fixed nonparametric component.
cluster
a clustering variable. There are 20 clusters. The cluster size is unbalanced; each cluster consists of from 5 to 30 observations.

Details

Data are generated from the following three models:
$y0=\beta_0+\beta_1x1+\beta_2x2+\beta_3x3+\gamma_1(t1)+u+e_0$

$y1=\beta_0+\beta_1x1+\beta_2x2+\beta_3x3+\gamma_1(t1)+u+e_1$

$y2=\beta_0+\beta_1x1+\beta_2x2+\beta_3x3+\gamma_2(t1,t2)+u+e_1$

where

$(\beta_0, \beta_1, \beta_2, \beta_3)=(1, 1, 0.5, -1)$

$\gamma_1(t1)=2sin(t1)$

$\gamma_2(t1, t2)=2sin(t1)+0.3t2+0.75t2^2$

$u \sim N(0,3)$

$e_0 \sim N(0,1)$

$e_1=x3*e_0$

u is the cluster-specific random intercept. x2 and t1 are correlated with correlation coefficient about 0.67.

Examples

Run this code
data(plmm.data)
str(plmm.data)

Run the code above in your browser using DataLab