prepareData {panelSUR}R Documentation

Prepare data for use

Description

This function prepares data that have to be used.

Usage

prepareData(data=data,
            restrictions=NULL,
            eqlist=eqlist)

Arguments

eqlist

a list containing the equations making up the SUR system. They should be object of the class "formula" and necessarly include the intercept,

restrictions

a vector containing constraints on the equation coefficients, which should be expressed in the form "equation_name$variable_name". Any spaces should be excluded from the restrictions definition. If one of the constraints includes an intercept term, the variable_name will be simply 'const'. Only simple restrictions involving equality between two parameters are considered, and not linear combinations involving more than two parameters,

data

a data frame of the class "pdata.frame" (mandatory).

Value

An object of class prepareData, which is a list of the following elements:

eqlist

list of the equations of the system,

neq

number of the system equations,

varlist

list of the system variables,

ncoeff

number of the system coefficients,

sumreg

position of the first variable of each equation, including the constant, in the ordered list of the variables of the system,

nconstr

number of contraints,

constr

a matrix with as many rows as constraints, and whose row elements indicate the position, in the sorted list of model variables, of the variables affected by each constraint,

nind

total number of individuals,

nt

total number of individuals observed in each period,

psur

table reporting the number of times each individual is observed,

psurmax

maximum number of times the individuals are observed in the panel,

tmax

number of period included in the panel,

sumTi

sum of squares of the numbers of times each individual is observed,

sumNt

sum of squares of the numbers of individuals observed in each time period,

vectorTi

vector containing the number of times each individual is observed,

sysdata

subset of the original data frame containing only the variables used in the estimated system,

infoSample

information on the sysdata dataframe obtained trougth the pdim command of the plm package.


[Package panelSUR version 0.1.0 Index]