Skip to contents

Function to simulate big data under Generalised Linear Models for the model misspecification scenario through any misspecification type.

Usage

GenModelMissGLMdata(No_Of_Var,Beta,Var_Epsilon,N,MisspecificationType,family)

Arguments

No_Of_Var

number of variables

Beta

a vector for the model parameters, including the intercept

Var_Epsilon

variance value for the residuals

N

the big data size

MisspecificationType

a character vector referring to different types of misspecification

family

a character vector for "linear", "logistic" and "poisson" regression from Generalised Linear Models

Value

The output of GenModelMissGLMdata gives a list of

N the big data size Beta a list of outputs(real and estimated) for the beta values Variance_Epsilon a list of outputs(real and estimated) for the variance epsilon Xbeta a list of outputs(real and estimated) for the linear predictor f a list of outputs(real and estimated) misspecification Real_Full_Data a matrix for Y,X and f(x) Full_Data a matrix for Y and X

Details

Big data for the Generalised Linear Models are generated by the "linear", "logistic" and "poisson" regression types under model misspecification.

We have limited the covariate data generation through uniform distribution of limits \((-1,1)\).

Different type of misspecifications are "Type 1", "Type 2 Squared", "Type 2 Interaction", "Type 3 Squared" or "Type 3 Interaction".

Examples

No_Of_Var<-2; Beta<-c(-1,2,2,1); Var_Epsilon<-0.5; N<-10000;
MisspecificationType <- "Type 2 Squared"; family <- "linear"

Results<-GenModelMissGLMdata(No_Of_Var,Beta,Var_Epsilon,N,MisspecificationType,family)

No_Of_Var<-2; Beta<-c(-1,2,2,1); N<-10000;
MisspecificationType <- "Type 2 Squared"; family <- "logistic"

Results<-GenModelMissGLMdata(No_Of_Var,Beta,Var_Epsilon=NULL,N,MisspecificationType,family)

No_Of_Var<-2; Beta<-c(-1,2,2,1); N<-10000;
MisspecificationType <- "Type 2 Squared"; family <- "poisson"

Results<-GenModelMissGLMdata(No_Of_Var,Beta,Var_Epsilon=NULL,N,MisspecificationType,family)