plmm.data: Data Set for the Package Examples

Description Usage Format Details Examples

Description

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

Usage

1

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=β_0+β_1x1+β_2x2+β_3x3+γ_1(t1)+u+e_0

y1=β_0+β_1x1+β_2x2+β_3x3+γ_1(t1)+u+e_1

y2=β_0+β_1x1+β_2x2+β_3x3+γ_2(t1,t2)+u+e_1

where

(β_0, β_1, β_2, β_3)=(1, 1, 0.5, -1)

γ_1(t1)=2sin(t1)

γ_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

1
2

plmm documentation built on May 2, 2019, 7:29 a.m.