Applied Econometrics with R Package Vignette and Errata

合集下载

1-Applied Micro-Econometrics

1-Applied Micro-Econometrics

is a biased
Multiple Regression Analysis: Estimation
Multiple Regression Analysis: Estimation
• Advantages of multiple regression analysis – build better models for predicting the dependent variable. • E.g. – generalize functional form. • Marginal propensity to consume – Be more amenable to ceteris paribus analysis • Key assumption: • Implication: other factors affecting wage are not related on average to educ and exper. • Multiple linear regression model:
• Can we draw ceteris paribus conclusions about how x affects y from a random sample of data, when we are ignoring all the other factors?
– Only if we make an assumption restricting how the unobservable random variable u is related to the explanatory variablபைடு நூலகம் x (u and x not correlated.)
• Jushua D. Angrist and Jörn-Steffen Pischke, 2009, Mostly Harmless Econometrics, An Empiricist’s Companion, Princeton.

A multi-product multi-echelon inventory control model with joint replenishment strategy

A multi-product multi-echelon inventory control model with joint replenishment strategy

A multi-product multi-echelon inventory control model with joint replenishment strategyWei-Qi Zhou ⇑,Long Chen,Hui-Ming GeSchool of Automobile and Traffic Engineering,Jiangsu University,Zhenjiang 212013,Chinaa r t i c l e i n f o Article history:Received 23January 2011Received in revised form 11April 2012Accepted 21April 2012Available online xxxx Keywords:InventoryMulti-product Multi-echelonGenetic Algorithm (GA)Joint replenishment strategya b s t r a c tOn the basis of analyzing the shortages of present studies on multi-echelon inventory con-trol,and considering some restrictions,this paper applies the joint replenishment strategy into the inventory system and builds a multi-product multi-echelon inventory control model.Then,an algorithm designed by Genetic Algorithm (GA)is used for solving the model.Finally,we respectively simulate the model under three different ordering strate-gies.The simulation result shows that the established model and the algorithm designed by GA have obvious superiority on reducing the total cost of the multi-product multi-echelon inventory system.Moreover,it illustrates the feasibility and the effectiveness of the model and the GA method.Crown Copyright Ó2012Published by Elsevier Inc.All rights reserved.1.IntroductionA supply chain is a network of nodes cooperating to satisfy customers’demands,and the nodes are arranged in echelons.In the network,each node’s position is corresponding to its relative position in reality.The nodes are interconnected through supply–demand relationships.These nodes serve external demand which generates orders to the downstream echelon,and they are served by external supply which responds to the orders of the upstream echelon.The problem of multi-echelon inventory control has been investigated as early as the 1950s by researchers such as Arrow et al.[1]and Love [2].The main challenge in these problems is to control the inventory levels by determining the size of the orders for each echelon during each period so as to optimize a given objective function.Many researchers have studied how to reduce the inventory cost of either suppliers or distributors,or have considered either the distribution system or the production system.Burns and Sivazlian [3]investigated the dynamic response of a multi-echelon supply chain to various demands placed upon the system by a final consumer.Van Beek [4]carried out a model in order to compare several alternatives for the way in which goods are forwarded from factory,via stores to the cus-tomers.Zijm [5]presented a framework for the planning and control of the materials flow in a multi-item production system.The prime objective was to meet a presanctified customer service level at minimum overall costs.Van der Heijden [6]deter-mined a simple inventory control rule for multi-echelon distribution systems under periodic review without lot sizing.Yoo et al.[7]proposed an improved DRP method to schedule multi-echelon distribution network.Diks and Kok [8]considered a divergent multi-echelon inventory system,such as a distribution system or a production system.Andersson and Melchiors [9]considered a one warehouse several retailers’inventory system,assuming lost sales at the retailers.Huang et al.[10]0307-904X/$-see front matter Crown Copyright Ó2012Published by Elsevier Inc.All rights reserved./10.1016/j.apm.2012.04.054⇑Corresponding author.Tel.:+8651188780074;fax:+8651188791900.E-mail address:zwqsky@ (W.-Q.Zhou).2W.-Q.Zhou et al./Applied Mathematical Modelling xxx(2012)xxx–xxxconsidered a one-warehouse multi-retailer system under constant and deterministic demand,which is subjected to transpor-tation capacity for every delivery godimos and Koukoumialos[11]developed closed-form customer service models.And many researchers have modeled an inventory system of only two-echelon or two-layer.Gupta and Albright[12] modeled a two-echelon multi-indentured repairable-item inventory system.Axsäter and Zhang[13]considered a two-level inventory system with a central warehouse and a number of identical retailers.Axsäter[14]considered a two-echelon distri-bution inventory system with stochastic demand.Chen et al.[15]considered a two-level inventory system in which there are one supplier and multiple retailers.Tee and Rossetti[16]developed a simulation model to explore the model’s ability to pre-dict system performance for a two-echelon one-warehouse,multiple retailer system.Seferlis and Giannelos[17]developed a new two-layered optimization-based control approach for multi-product,multi-echelon supply chain networks.Hill et al.[18]considered a single-item,two-echelon,continuous-review inventory model.Al-Rifai and Rossetti[19]presented a two-echelon non-repairable spare parts inventory system.Mitra[20]considered a two echelon system with returns under more generalized conditions,and developed a deterministic model as well as a stochastic model under continuous review for the system.There are also many researches on multi-echelon inventory control,considering either the distribution system or the sup-ply system.Choi et al.[21]evaluated conventional lot-sizing rules in a multi-echelon coalescence MRP system.Chikán and Vastag[22]described a multi-echelon production inventory system and developed a heuristic suggestion.Bregman et al.[23]introduced a heuristic algorithm for managing inventory in a multi-echelon environment.Van der Vorst et al.[24]pre-sented a method for modeling the dynamic behavior of multi-echelon food supply chains and evaluating alternative designs of the supply chain by applying discrete-event simulation.The model considered a producer,a distribution center and2re-tailer outlets.Iida[25]studied a dynamic multi-echelon inventory problem with nonstationary u and Lau[26] applied different demand-curve functions to a simple inventory/pricing model.Routroy and Kodali[27]developed a three-echelon inventory model for single product,which consists of single manufacturer,single warehouse and single retailer. Dong and Lee[28]considered a multi-echelon serial periodic review inventory system and3echelons for numerical exam-ple.The system extended the approximation to the time correlated demand process of Clark and Scarf[29],and studied in particular for an auto-regressive demand model the impact of leadtimes and auto-correlation on the performance of the se-rial inventory system.Gumus and Guneri[30]structured an inventory management framework and deterministic/stochas-tic-neurofuzzy cost models within the context of this framework for effective multi-echelon supply chains under stochastic and fuzzy environments.Caggiano et al.[31]described and validated a practical method for computing channelfill rates in a multi-item,multi-echelon service parts distribution system.Yang and Lin[32]provided a serial multi-echelon integrated just-in-time(JIT)model based on uncertain delivery lead time and quality unreliability considerations.Gumus et al.[33] structured an inventory management framework and deterministic/stochastic-neuro-fuzzy cost models within the context of the framework.Then,a numerical application in a three-echelon tree-structure chain is presented to show the applicabil-ity and performance of proposed framework.The model only handled one product type.Only one other paper we are aware of addresses a problem similar to ours and consideres inventory optimization in a multi-echelon system,considering both the distribution system and the supply system.Rau et al.[34]developed a multi-echelon inventory model for a deteriorating item and to derive an optimal joint total cost from an integrated perspective among the supplier,the producer,and the buyer.The model considered the single supplier,single producer and single buyer. The basic difference between our model and Rau et al.[34]is that our model considers multiple suppliers,one producer,and multiple distributors and buyers.Additionally,an algorithm designed by Genetic Algorithm(GA)is used for solving the mod-el,and we apply the joint replenishment strategy into the model.The remainder of this paper is organized as follows:In Section2,the various assumptions are made and the multi-product multi-echelon inventory control model is developed.In Section3,GA is used for solving the model and the algorithm based on GA is designed.Then,we simulate the model under three different ordering strategies,respectively.In Section4,conclu-sions and limitations in this research are presented.2.Mathematical model2.1.The multi-product multi-echelon inventory control model descriptionIn this model,the raw materials,accessories or products can be supplied from the nodal enterprise of layer k to the nodal enterprise of layer k +1,but there is no logistics between nodal enterprises of the same layer or the non-adjacent layers.And also there is no reverse logistics from the nodal enterprise of high-layer to the nodal enterprise of low-layer.The multi-prod-uct multi-echelon inventory system is divided into three subsystems (supply network,core enterprise and distribution net-work)by the core enterprise as a dividing line (Fig.1).The key issue to the multi-product multi-echelon inventory system is to determine the optimal order quantity and the optimal order cycle for each nodal enterprise in order to minimize the inventory cost of the whole system.In this paper,the (T ,S )inventory control strategy based on multi-product joint replenishment is used.The multi-product joint replenishment strategy is an ordering strategy that to order varieties of products in one order cycle.Each nodal enter-prise determines a minimum order cycle as the basic order cycle,and the order cycle of the same enterprise to order each product is an integral multiple of the basic order cycle.2.2.Assumptions(1)In this supply chain,there is only one core enterprise.(2)Allow a variety of products,but the price of each product is fixed.And also allow a variety of raw materials or acces-sories,but one supplier only provides one raw material or accessory.(3)The demand of each nodal enterprise per day is random,but it obeys Poisson distribution.(4)Lead time of each nodal enterprise is fixed.(5)Storage cost per product per unit time is constant.And the storage cost of different nodal enterprises is allowed to bedifferent.2.3.Notations P w price of product w (there are W kind of products,and w =1,2,...,W )P g k Àl price of raw material or accessory provided by the nodal enterprise g of layer k Àl (g =1,2,...,m k Àl ;l =1,2,...,k À1;m k Àl is the number of nodal enterprises of layer k Àl)T h k basic order cycle of the nodal enterprise h of layer k to order products from the nodal enterprises of layer k À1T ðg ;h Þk order cycle of the nodal enterprise h of layer k to order products from the nodal enterprise g of layer k À1Z ðg ;h Þkratio of T ðg ;h Þkand T h k ,which is a positive integer,so T ðg ;h Þk¼Z ðg ;h ÞkT hkA h k public ordering cost of the nodal enterprise h of layer k to order products from the nodal enterprises of layer k À1ineach order cycle,which is independent of the order quantity and the order varietiesA ðg ;h Þkindividual ordering cost of the nodal enterprise h of layer k to order products from the nodal enterprise g of layer k À1in each order cycle,which is dependent of the order quantity and the order varietiesA ðh ;i ;w Þk þl individual ordering cost of the nodal enterprise i of layer k +l to order the product w from the nodal enterprise h of layer k +l À1in each order cycle,in the distribution networkT i k þl basic order cycle of the nodal enterprise i of layer k +l to order products from the nodal enterprises of layer k +l À1,in the distribution networkT ði ;w Þk þl order cycle of the nodal enterprise i of layer k +l to order product w from the nodal enterprises of layer k À1,in the distribution networkZ ði ;w Þk þlratio of T ði ;w Þk þl and T i k þl ,which is a positive integer,so T ði ;w Þk þl ¼Z ði ;w Þk þl T i k þlS ðg ;h Þk maximum inventory level of the nodal enterprise h of layer k to order products from the nodal enterprise g of layer k À1E D ðg ;h Þk average demand of the nodal enterprise h of layer k to order products from the nodal enterprise g of layer k À1perdayL ðg ;h Þk lead time of the nodal enterprise h of layer k to order products from the nodal enterprise g of layer k À1L ði ;w Þk þl the average lead time of the nodal enterprise i of layer k +l to order the product w from the nodal enterprise of layer k +l À1H ðg ;h Þk storage cost of the nodal enterprise h of layer k per product per yearY ðg ;h Þk quantity demand of the nodal enterprise h of layer k to order products from the nodal enterprise g of layer k À1peryear,so Y ðg ;h Þk ¼365E D ðg ;h Þkn ðg ;h Þkthe number of trips from the nodal enterprise g of layer k À1to the nodal enterprise h of layer k per year,which isinversely proportional to order cycle,so n ðg ;h Þk ¼Z ðg ;h Þk T h kÀ1W.-Q.Zhou et al./Applied Mathematical Modelling xxx (2012)xxx–xxx3f ðg ;h Þkfixed transportation cost from the nodal enterprise g of layer k À1to the nodal enterprise h of layer k in each trans-portation (such as driver’s wage)t ðg ;h Þkvariable transportation cost to transport the unit product from the nodal enterprise g of layer k À1to the nodal enter-prise h of layer k (such as cost of fuels),which is the function of transport efficiency and order quantity in the case of fixed transportation distanceX ðh ;i ;w Þkthe expected value of the produce w of the nodal enterprise h of layer k relative to order quantity of the nodal enter-prise i of layer k +11ðg ;h ;w Þk conversion rate of product w produced by the nodal enterprise h of layer k relative to raw materials or accessories supplied by the nodal enterprise g of layer k À1g ðh ;i ;w Þksupply coefficient of product w supplied from the nodal enterprise h of layer k to the nodal enterprise i of layer k +1,and P m k þ1i ¼1g ðh ;i ;w Þk ¼1b ðg ;h ;w Þkproportionality coefficient of raw materials or accessories used to produce product w ,which are supplied from thenodal enterprise g of layer k À1to the nodal enterprise h of layer k ,and P W w ¼1b ðg ;h ;w Þk¼1B ðh ;i ;w Þkshortage penalty per produce w per order cycle from the nodal enterprise i of layer k +1to the nodal enterprise h of layer k2.4.Multi-product multi-echelon inventory control modelWe divide the inventory cost into ordering cost,holding cost,transportation cost and shortage cost.(1)Ordering costThe total ordering cost of the core enterprise per year is defined as follows:C Order C¼X m kh ¼1A h kT hkþXm k À1g ¼1X m k h ¼1A ðg ;h ÞkZ ðg ;h ÞkT hk:ð1ÞThe total ordering cost of the supply network per year is defined as follows:C Order S¼X k À2l ¼1X m k Àl g ¼1Ag k ÀlT g k ÀlþX k À2l ¼1X m k Àl À1f ¼1X m k Àl g ¼1A ðf ;g Þk Àl Z ðf ;g Þk Àl T g k Àl:ð2ÞThe total ordering cost of the distribution network per year is defined as follows:C Order D¼X N Àk l ¼1X m k þl i ¼1Ai k þl T ik þlþX N Àk l ¼1X m k þl À1h ¼1X m k þl i ¼1X W w ¼1A ðh ;i ;w Þk þl Z ði ;w Þk þl T ik þl:ð3ÞTherefore,the total ordering cost of the multi-product multi-echelon inventory system per year is defined as follows:TC Order ¼C Order C þC Order S þC Order D:ð4Þ(2)Holding costThe inventory level of the nodal enterprise h of layer k when it has received the order quantity from the nodal enter-prise of layer k À1is:S ðg ;h ÞkÀE D ðg ;h Þk L ðg ;h Þk ;ð5Þand the inventory level of the nodal enterprise h of layer k before it receives the order quantity next order cycle is:S ðg ;h ÞkÀE D ðg ;h Þk L ðg ;h Þk ÀE D ðg ;h Þk Z ðg ;h Þk T h k :ð6ÞTherefore,the average inventory level in one order cycle is:12S ðg ;h Þk ÀE D ðg ;h Þk L ðg ;h Þk þS ðg ;h Þk ÀE D ðg ;h Þk L ðg ;h Þk ÀE D ðg ;h Þk Z ðg ;h Þk T h k hi ¼S ðg ;h Þk ÀE D ðg ;h Þk L ðg ;h Þk ÀE D ðg ;h ÞkZ ðg ;h Þk T h k 2:ð7ÞThe total holding cost of the core enterprise per year is defined as follows:C Hold C¼Xm k À1g ¼1X m k h ¼1S ðg ;h Þk ÀE D ðg ;h Þk L ðg ;h Þk ÀE D ðg ;h Þk Z ðg ;h Þk T h k22435H ðg ;h Þk:ð8Þ4W.-Q.Zhou et al./Applied Mathematical Modelling xxx (2012)xxx–xxxAs a practical matter,we must ensure that the average inventory level is greater than zero,as shown in Eq.(9):Sðg;hÞk ÀE Dðg;hÞkLðg;hÞkÀE Dðg;hÞkZðg;hÞkT hk2>0:ð9ÞThe total holding cost of the supply network per year is defined as follows:C Hold S ¼X kÀ2l¼1Xm kÀlÀ1f¼1X m kÀlg¼1Sðf;gÞkÀlÀE Dðf;gÞkÀlLðf;gÞkÀlÀE Dðf;gÞkÀlZðf;gÞkÀlT gkÀl22435Hðf;gÞkÀl;ð10Þunder the following constraint:Sðf;gÞkÀl ÀE Dðf;gÞkÀlLðf;gÞkÀlÀE Dðf;gÞkÀlZðf;gÞkÀlT gkÀl2>0:ð11ÞThe total holding cost of the distribution network per year is defined as follows:C HoldD ¼X NÀkl¼1X m kþli¼1X Ww¼1Sði;wÞkþlÀE Dði;wÞkþlLði;wÞkþlÀE Dði;wÞkþlZði;wÞkþlT ikþl22435Hði;wÞkþl;ð12Þunder the following constraint:Sði;wÞkþl ÀE Dði;wÞkþlLði;wÞkþlÀE Dði;wÞkþlZði;wÞkþlT ikþl2>0:ð13ÞTherefore,the total holding cost of the multi-product multi-echelon inventory system per year is defined as follows:TC Hold¼C HoldC þC HoldSþC HoldD:ð14Þ(3)Transportation costThe total transportation cost of the core enterprise per year is defined as follows:C Trans C ¼Xm kÀ1g¼1X m kh¼1nðg;hÞkfðg;hÞkþtðg;hÞkYðg;hÞkh i:ð15ÞThe total transportation cost of the supply network per year is defined as follows:C Trans S ¼X kÀ2l¼1Xm kÀlÀ1f¼1X m kÀlg¼1nðf;gÞkÀlfðf;gÞkÀlþtðf;gÞkÀl Yðf;gÞkÀlh i;ð16Þwhere nðf;gÞkÀl ¼Zðf;gÞkÀlT gkÀlÀ1;Yðf;gÞkÀl¼365E Dðf;gÞkÀlThe total transportation cost of the distribution network per year is defined as follows:C TransD ¼X Ww¼1X NÀkl¼1Xm kþlÀ1h¼1X m kþli¼1nði;wÞkþlfðh;iÞkþlþtðh;iÞkþl Yðh;i;wÞkþlh i;ð17Þwhere nði;wÞkþl ¼Zði;wÞkþlT ikþlÀ1;Yðh;i;wÞkþl¼365E Dðh;i;wÞkþlTherefore,the total transportation cost of the multi-product multi-echelon inventory system per year is defined as follows:TC Trans¼C TransC þC TransSþC TransD:ð18Þ(4)Shortage costAssuming Xðh;i;wÞk obeys Poisson distribution p kðh;i;wÞkZðg;hÞkT hkþLðg;hÞkh iduring the period Zðg;hÞkT hkþLðg;hÞk,so:Xðh;i;wÞk ¼X1u¼AuÀgðh;i;wÞk1ðg;h;wÞkbðg;h;wÞkSðg;hÞkp kðh;i;wÞkZðg;hÞkT hkþLðg;hÞkh i:ð19ÞThe total shortage cost of the core enterprise per year is defined as follows:C Shortage C ¼X m kh¼1Xm kþ1i¼1X Ww¼1Bðh;i;wÞkXðh;i;wÞkZðg;hÞkT hk:ð20ÞW.-Q.Zhou et al./Applied Mathematical Modelling xxx(2012)xxx–xxx5The total shortage cost of the supply network per year is defined as follows:C Shortage S¼X k À2l ¼1X m k Àl g ¼1X m k Àl þ1h ¼1B ðg ;h Þk Àl X ðg ;h Þk ÀlZ k Àl T g k Àl;ð21ÞwhereX ðg ;h Þk Àl¼P 1u ¼Au Àgðg ;h Þk Àl 1ðf ;g Þk Àl S ðf ;g Þk Àlp k ðg ;h Þk Àl Z ðf ;g Þk Àl T g k Àl þL ðf ;g Þk Àl h i ;g ðg ;h Þk Àl ¼E D ðg ;h Þk Àl þ1ÀÁP m k Àl þ1h ¼1E Dðg ;h Þk Àl þ1ÀÁ,and P m k Àl þ1h ¼1g ðg ;h Þk Àl ¼1.The total shortage cost of the distribution network per year is defined as follows:C Shortage D¼X N Àk l ¼1X m k þl i ¼1X m k þl þ1j ¼1X W w ¼1B ði ;j ;w Þk þl X ði ;j ;w Þk þl Z ði ;w Þk þl T i k þl;ð22ÞwhereX ði ;j ;w Þk þl¼X 1u ¼Au Àg ði ;j ;w Þk þl S ði ;w Þk þl p k ði ;j ;w Þk þl Z ði ;w Þk þl T i k þl þL ði ;w Þk þl h i;gði ;j ;w Þk þl¼E D ði ;j ;w Þk þlk þl þ1j ¼1E D ði ;j ;w Þk þl;andX m k þl þ1j ¼1g ði ;j ;w Þk¼1:Therefore,the total shortage cost of the multi-product multi-echelon inventory system per year is defined as follows:TC Shortage ¼C Shortage C þC Shortage SþC Shortage D :ð23ÞIn conclusion,we develop the multi-product multi-echelon inventory control model as follows:minTC ¼TC Order þTC Hold þTC Trans þTC Shortage ;ð24Þs :t :E D ðg ;h ÞkL ðg ;h Þk þE D ðg ;h Þk Z ðg ;h Þk T h k 2ÀS ðg ;h Þk <0;ð25ÞE D ðf ;g Þk Àl L ðf ;g Þk Àl þE D ðf ;g Þk Àl Z ðf ;g Þk Àl T g k Àl 2ÀS ðf ;g Þk Àl <0;l ¼1;2;...;k À2;f ¼1;2;...;m k Àl À1;g ¼1;2;...;m k Àl ;ð26ÞE D ði ;w Þk þl L ði ;w Þk þl þE D ði ;w Þk þl Z ði ;w Þk þl T i k þl2ÀS ði ;w Þk þl <0;l ¼1;2;...;N Àk ;i ¼1;2;...;m k þl ;w ¼1;2;...;W ;ð27Þmin Z g ¼1;h ðÞk ;Z g ¼2;h ðÞk ;...;Z g ¼m k À1;h ðÞk h i¼1;ð28Þmin Z ðf ¼1;g Þk Àl ;Z ðf ¼2;g Þk Àl ;...;Z ðf ¼m k Àl À1;g Þk Àl h i¼1;l ¼1;2;3;...;k À2;ð29Þmin Z ði ;w ¼1Þk þl ;Z ði ;w ¼2Þk þl ;...;Z ði ;w ¼W Þk þl h i ¼1;l ¼1;2;3;...;N Àk :ð30Þ(28)–(30)can ensure that at least one product’s order cycle is the basic order cycle.The decision variables in the model are allintegers greater than or equal to zero.3.Simulation and analysis 3.1.Simulation model based on GAThe objective function of this optimization model is minimization,and the objective function of GA is maximization,so the objective function of this optimization model cannot be taken as the fitness function of GA.We must convert the objec-tive function to the fitness function of GA as follows:F ðX Þ¼TC max ÀTC ;TC <TC max ;0;TC P TC max ;&ð31Þwhere F (X )is the individual fitness.TC max is a relatively large number,and in this simulation model,we may put TC max as the largest objective function value during evolution.The multi-product multi-echelon inventory control model can be reduced to a nonlinear programming problem as follows:6W.-Q.Zhou et al./Applied Mathematical Modelling xxx (2012)xxx–xxxmin f ðX Þ;ð32Þs :t :g i ðX Þ60ði ¼1;2;3;...;m Þ:In this paper,penalty function is used as constraint.So,we construct the penalty function as follows:/ðX ;c kÞ¼X m i ¼1c k i min g i ðX Þ;0ðÞ2;ð33Þwhere k is iteration times of GA.c k i is penalty factor,which is a monotone increasing sequence and positive value.Andc k þ1i ¼e i Ác ki .The experience in computation shows that if c k i ¼1and e i =5À10,we can achieve satisfactory results.So,we change (31)to the function as follows:F ðX Þ¼TC max ÀTC À/ðX ;c k Þ;TC <TC max ;0;TC P TC max :(ð34ÞMoreover,we use the floating point number coding (the chromosome’s length equals the number of decision variables),the roulette wheels selection mechanism as the selection operator,the arithmetic cross technique as the crossover operator,the Gauss mutation operator as the mutation operator,and algebra (its values range from 100to 500)as the termination criteria.3.2.SimulationAs an illustration,we develop a multi-product multi-echelon inventory control model which has four suppliers (the four suppliers are divided into two levels and each level has two suppliers),one core enterprise and two distributors,and has two products (Fig.2).The average demand of the customers to order product 1and product 2from the distributor 1of layer 4per day is 6units and 3units.The average demand of the customers to order product 1and product 2from the distributor 2of layer 4per day is 4units and 7units.The values of other parameters are shown in Tables 1–3.Table 2The values of the parameters of the supply network.Parameters A 12A ð1;1Þ2A ð2;1Þ2A 22A ð1;2Þ2A ð2;2Þ2L ð1;1Þ2L ð2;1Þ2L ð1;2Þ2Values $70$200$180$60$250$250666Parameters L ð2;2Þ2H ð1;1Þ2H ð2;1Þ2H ð1;2Þ2H ð2;2Þ2f ð1;1Þ2f ð2;1Þ2f ð1;2Þ2f ð2;2Þ2Values 6$3$6$3$15$200$140$250$150Parameters t ð1;1Þ2t ð2;1Þ2t ð1;2Þ2t ð2;2Þ2g ð1;1Þ2g ð2;1Þ2g ð1;2Þ2g ð2;2Þ21ð1;1Þ2Values $4$6$5$811111Parameters 1ð2;1Þ21ð1;2Þ21ð2;2Þ2B ð1;1Þ2B ð2;1Þ2B ð1;2Þ2B ð2;2Þ2Values0.510.5$150$120$160$140Table 1The values of the parameters of the core enterprise.Parameters A 13A ð1;1Þ3A ð2;1Þ3L ð1;1Þ3L ð2;1Þ3H ð1;1Þ3H ð2;1Þ3f ð1;1Þ3f ð2;1Þ3Values $100$240$32055$5$40$300$350Parameters t ð1;1Þ3t ð2;1Þ3g ð1;1;1Þ3g ð1;2;1Þ3g ð1;1;2Þ3g ð1;2;2Þ31ð1;1;1Þ31ð2;1;1Þ31ð1;1;2Þ3Values $15$100.60.40.30.70.510Parameters 1ð2;1;2Þ3b ð1;1;1Þ3b ð1;1;2Þ3b ð2;1;1Þ3b ð2;1;2Þ3B ð1;2;1Þ3B ð1;1;2Þ3B ð1;2;2Þ3B ð1;1;1Þ3Values110.50.5$150$120$180$200W.-Q.Zhouet al./Applied Mathematical Modelling xxx (2012)xxx–xxx 7。

R语言常用计量分析包

R语言常用计量分析包

R语言常用计量分析包CRAN任务视图:计量经济学线形回归模型(Linear regression models)线形模型可用stats包中lm()函数通过OLS来拟合,该包中也有各种检验方法用来比较模型,如:summary() 和anova()。

lmtest包里的coeftest()和waldtest()函数是也支持渐近检验(如:z检验而不是检验,卡方检验而不是F检验)的类似函数。

car包里的linear.hypothesis()可检验更一般的线形假设。

HC和HAC协方差矩阵的这些功能可在sandwich包里实现。

car和lmtest包还提供了大量回归诊断和诊断检验的方法。

工具变量回归(两阶段最小二乘)由AER包中的ivreg()提供,其另外一个实现sem包中的tsls()。

微观计量经济学(Microeconometrics)许多微观计量经济学模型属于广义线形模型,可由stats包的glm()函数拟合。

包括用于选择类数据(choice data)的Logit和probit模型,用于计数类数据(count data)的poisson模型。

这些模型回归元的值可用effects获得并可视化。

负二项广义线形模型可由MASS包的glm.nb()实现。

aod包提供了负二项模型的另一个实现,并包含过度分散数据的其它模型。

边缘(zero-inflated)和hurdle计数模型可由pscl包提供。

多项响应(Multinomial response):特定个体协变量(individual-specific covariates)多项模型只能由nnet包中multinom()函数提供。

mlogit包实现包括特定个体和特定选择(choice-specific)变量。

多项响应的广义可加模型可由VGAM包拟合。

针对多项probit模型的贝叶斯方法由MNP包提供,各种贝叶斯多项模型(包括logit和probit)在bayesm包中可得。

r语言数据挖掘方法及应用参考文献写法

r语言数据挖掘方法及应用参考文献写法

R语言(R programming language)是一种用于统计分析和数据可视化的开源编程语言,因其功能强大且易于学习和使用而备受数据分析领域的青睐。

在数据挖掘领域,R语言被广泛应用于数据预处理、特征提取、模型建立和结果可视化等方面。

本文将介绍R语言在数据挖掘中的常用方法及其在实际应用中的效果,并给出相应的参考文献写法,以供读者参考。

一、数据预处理在进行数据挖掘之前,通常需要对原始数据进行清洗和预处理,以确保数据的质量和可用性。

R语言提供了丰富的数据处理函数和包,可以帮助用户快速进行数据清洗和整理工作。

其中,常用的数据预处理方法包括缺失值处理、异常值检测、数据变换等。

以下是一些常用的数据预处理方法及其在R语言中的实现方式:1. 缺失值处理缺失值是指数据中的某些观测值缺失或不完整的情况。

在处理缺失值时,可以选择删除缺失值所在的行或列,或者利用均值、中位数等方法进行填充。

R语言中,可以使用na.omit()函数删除包含缺失值的行或列,也可以使用mean()函数计算均值,并利用fillna()函数进行填充。

参考文献:Hadley Wickham, Rom本人n François, Lionel Henry, and KirillMüller (2018). dplyr: A Grammar of Data Manipulation. Rpackage version 0.7.6. xxx2. 异常值检测异常值是指与大部分观测值存在显著差异的观测值,通常需要进行检测和处理。

R语言中,可以使用boxplot()函数对数据进行箱线图可视化,或者利用z-score等统计方法进行异常值检测。

对于异常值的处理,可以选择删除、替换或保留,具体方法视实际情况而定。

参考文献:Rob J Hyndman and Yanan Fan (1996). Sample Quantiles in Statistical Packages. The American Statistician, 50(4), 361-365.3. 数据变换数据变换是指对原始数据进行变换,将其转换为符合模型要求或满足分布假设的形式。

r语言 系统动力学

r语言 系统动力学

r语言系统动力学系统动力学(System Dynamics)是一种研究时间变化对于系统行为和结构的影响的方法。

它主要用于模拟和分析复杂的动态系统,如经济系统、生态系统和社会系统等。

在R语言中,有许多包可以用于系统动力学建模和分析,如“deSolve”、“dyntools”和“simecol”等。

这些包提供了一系列函数和工具,可用于构建系统动力学模型、模拟模型的行为以及进行参数敏感性分析和优化等操作。

例如,可以使用“deSolve”包中的函数来解决微分方程组,从而模拟系统的动态行为。

使用“simecol”包可以方便地构建连续时间的系统动力学模型,并进行模拟和分析。

以下是一个在R语言中使用系统动力学建模的示例:1. 安装和加载相关的R包:```Rinstall.packages("deSolve") # 安装deSolve包install.packages("simecol") # 安装simecol包library(deSolve) # 加载deSolve包library(simecol) # 加载simecol包```2. 定义系统动力学模型:```R# 定义一个简单的连续时间系统动力学模型simple_model <- new("odeModel",main = function(time, state, pars) {with(as.list(c(state, pars)), {dX <- -k * X # 定义X的变化率return(list(dX)) # 返回变化率})},parms = c(k = 0.1), # 定义模型参数init = c(X = 1) # 定义初始状态值)```3. 模拟和绘制系统的行为:```R# 模拟模型的行为times <- seq(0, 10, by = 0.1) # 定义时间步长和模拟时间范围out <- ode(y = simple_model$init, times = times, func =simple_model$main, parms = simple_model$pars) # 运行模拟# 绘制模拟结果plot(out, xlab = "Time", ylab = "X", type = "l") # 绘制X随时间的变化曲线```上述代码演示了如何使用R语言中的系统动力学包进行模拟和分析。

R的应用领域包介绍

R的应用领域包介绍

R的应用领域包介绍 By R-FoxAnalysis of Pharmacokinetic Data 药物(代谢)动力学数据分析网址:/web/views/Pharmacokinetics.html维护人员:Suzette Blanchard版本:2008-02-15翻译:R-fox, 2008-04-12药物(代谢)动力学数据分析的主要目的是用非线性浓度时间曲线(concentration time curve)或相关的总结(如曲线下面积)确定给药方案(dosing regimen)和身体对药物反应间的关系。

R基本包里的nls()函数用非线性最小二乘估计法估计非线性模型的参数,返回nls类的对象,有 coef(),formula(), resid(),print(), summary(),AIC(),fitted() and vcov()等方法。

在主要目的实现后,兴趣就转移到研究属性(如:年龄、体重、伴随用药、肾功能)不同的人群是否需要改变药物剂量。

在药物(代谢)动力学领域,分析多个个体的组合数据估计人群参数被称作群体药动学(population PK)。

非线性混合模型为分析群体药动学数据提供了自然的工具,包括概率或贝叶斯估计方法。

nlme包用Lindstrom和Bates提出的概率方法拟合非线性混合效应模型(1990, Biometrics 46, 673-87),允许nested随机效应(nested random effects),组内误差允许相关的或不等的方差。

返回一个nlme类的对象表示拟合结果,结果可用print(),plot()和summary() 方法输出。

nlme对象给出了细节的结果信息和提取方法。

nlmeODE包组合odesolve包和nlme包做混合效应建模,包括多个药动学/药效学(PK/PD)模型。

面版数据(panel data)的贝叶斯估计方法在CRAN的Bayesian Inference任务列表里有所描述(/web/views/Bayesian.html)。

英文文献 回归模型r语言

英文文献 回归模型r语言

英文文献回归模型r语言回归模型在统计学和机器学习中被广泛应用,而R语言作为一种流行的统计分析工具,也被用于实现各种回归模型。

在英文文献中,关于回归模型和R语言的结合有很多相关的研究和资料。

这些文献涵盖了从基础到高级的各种回归模型在R语言中的实现和应用。

首先,让我们从基础开始。

有一些文献专门介绍了如何在R语言中实现简单线性回归(simple linear regression)和多元线性回归(multiple linear regression)。

这些文献通常会讲解如何使用R中的lm()函数来拟合回归模型,以及如何解释和评估模型的结果。

一些经典的参考书籍如《An Introduction to Statistical Learning》和《Applied Regression Analysis》提供了丰富的案例和代码,可以帮助读者深入理解回归模型在R中的实现。

其次,针对特定领域的研究,有许多文献探讨了高级的回归模型在R语言中的应用。

比如,关于时间序列分析的文献会介绍如何使用R中的arima()函数来构建自回归(autoregressive)、移动平均(moving average)和ARIMA模型。

另外,关于广义线性模型(generalized linear model)和混合效应模型(mixed effects model)的文献也有很多,这些模型在R语言中有丰富的包和函数来支持。

此外,还有一些文献专门讨论了回归诊断(regression diagnostics)和模型选择(model selection)在R语言中的实现。

这些内容涉及到如何检验回归模型的假设、识别异常值和影响点,以及利用交叉验证等方法选择最佳的模型。

最后,关于回归模型和R语言的文献还包括了一些实际案例和研究论文,这些文献通过具体的数据集和分析过程展示了回归模型在R中的应用。

这些案例可以帮助读者更好地理解如何将理论知识转化为实际研究中的解决方案。

英文文献 回归模型r语言

英文文献 回归模型r语言

英文文献回归模型r语言回归模型是统计学中常用的一种模型,用于研究自变量和因变量之间的关系。

在R语言中,有多种方法可以实现回归模型,包括线性回归、多元线性回归、逻辑回归等。

这些方法可以通过R中的内置函数或者外部包来实现。

在英文文献中,关于回归模型在R语言中的应用有很多相关的研究和论文。

这些文献通常会涵盖回归模型的理论基础、在R语言中的具体实现方法、案例分析以及模型评估等内容。

一些常见的英文文献题目可能包括:1. "Introduction to Regression Models in R Language"2. "Linear Regression Analysis Using R: A Comprehensive Review"3. "Application of Logistic Regression Model in R for Medical Research"4. "Comparative Study of Different Regression Models in R Language"5. "Advanced Topics in Regression Analysis with R:Model Selection and Validation"这些文献可能会从不同的角度探讨回归模型在R语言中的应用,包括理论基础、实际操作、案例分析、模型评估等方面。

一些文献可能还会涉及到与其他统计软件的比较分析,以及对于不同类型数据的回归模型选择和应用等内容。

总之,回归模型在R语言中的应用是一个广泛的研究领域,有很多相关的英文文献可供参考,涵盖了理论和实践两个方面,对于想要深入了解回归模型在R语言中的应用的人来说,这些文献将是宝贵的资料来源。

混合效应模型r语言lme4包公式

混合效应模型r语言lme4包公式

混合效应模型r语言lme4包公式下载提示:该文档是本店铺精心编制而成的,希望大家下载后,能够帮助大家解决实际问题。

文档下载后可定制修改,请根据实际需要进行调整和使用,谢谢!本店铺为大家提供各种类型的实用资料,如教育随笔、日记赏析、句子摘抄、古诗大全、经典美文、话题作文、工作总结、词语解析、文案摘录、其他资料等等,想了解不同资料格式和写法,敬请关注!Download tips: This document is carefully compiled by this editor. I hope that after you download it, it can help you solve practical problems. The document can be customized and modified after downloading, please adjust and use it according to actual needs, thank you! In addition, this shop provides you with various types of practical materials, such as educational essays, diary appreciation, sentence excerpts, ancient poems, classic articles, topic composition, work summary, word parsing, copy excerpts, other materials and so on, want to know different data formats and writing methods, please pay attention!研究主题:混合效应模型在R语言lme4包中的应用1. 引言混合效应模型是统计学中的重要方法之一,它可以用来分析具有多层次结构的数据。

corrplot包引用文献

corrplot包引用文献

corrplot包引用文献
在统计学和数据分析领域,corrplot包是一个非常有用的工具,用于创建各种相关系数矩阵的可视化。

该包是由R语言的开发社区贡献的,主要用于展示多个变量之间的相关性。

以下是关于corrplot包的引用文献:
1. 《corrplot: A Pretty Visualization of Correlation Matrices》,作者:Yihui Xie,于2018年发表在《The Journal of Open Source Software》。

该文献详细介绍了corrplot包的背景、功能和实现方式,以及如何使用该包创建各种相关系数矩阵的可视化。

此外,还讨论了该包的未来发展方向和潜在应用场景。

2. 《Visualizing Correlation Matrices with corrplot in R》,作者:Emily Riederer,于2019年发表在《The American Statistician》。

该文献介绍了如何使用corrplot包在R语言中创建各种相关系数矩阵的可视化,包括散点图、气泡图和颜色图等。

此外,还讨论了如何定制这些可视化图形的样式和格式。

3. 《Correlation Visualization with corrplot in R: A Primer》,作者:Dirk Eddelbuettel,于2017年发表在《The R Journal》。

该文献提供了一个简单的指南,介绍了如何使用corrplot包创建各种相关系数矩阵的可视化。

此外,还讨论了如何解读这些可视化图形,以及如何将它们用于实际数据分析项目中。

R包birtr:基础项目响应理论使用R的R包说明书

R包birtr:基础项目响应理论使用R的R包说明书

Package‘birtr’October12,2022Title The R Package for``The Basics of Item Response Theory Using R''Version1.0.0Maintainer Seock-Ho Kim<*************>Description R functions for``The Basics of Item Response Theory Us-ing R''by Frank B.Baker and Seock-Ho Kim(Springer,2017,ISBN-13:978-3-319-54204-1)in-cluding iccplot(),icccal(),icc(),iccfit(),groupinv(),tcc(),ability(),tif(),and rasch().For exam-ple,iccplot()plots an item characteristic curve under the two-parameter logistic model. Depends R(>=3.4.1)License GPL(>=2)Encoding UTF-8LazyData trueRoxygenNote6.0.1Suggests testthatNeedsCompilation noAuthor Seock-Ho Kim[aut,cre]Repository CRANDate/Publication2017-10-0410:42:46UTCR topics documented:ability (2)birtr (3)groupinv (4)icc (5)icccal (6)iccfit (7)iccplot (8)rasch (8)tcc (9)tif (10)Index1212ability ability Ability EstimationDescriptionEstimates the ability parameter and obtains the standard error of the estimate given the item char-acteristic curve model,the response vector,and the set of known item parameters under the one-, two-,or three-parameter logistic model.Usageability(mdl,u,b,a,c)Argumentsmdl1,2,or3representing the number of the model parameters.u a numeric vector of0s and1s representing the responses to items.b a numeric vector representing the values of item difficulty.a a numeric vector representing the values of item discrimination.c a numeric vector representing the values of lower asymptote.DetailsWith the number of item characteristic curve model parameters mdl,the response vector u,and the set of item parameters b,a,and c,the ability parameter is estimated and reported as th by the maximum likelilhood procedure.The estimated standard error se is also obtained and reported.The length of u should be the same as that of b,a,and c.Each parameter c has a theoretical range from0to1,but in practice values above.35are not considered acceptable,hence use the range from0to.35for each c.Under the one-parameter logisric model,a=rep(1,length(b))and c= rep(0,length(b)).Under the two-parameter logistic model,c=rep(0,lenght(b)). ReferencesBaker,F.B.,&Kim,S.-H.(2017).The basics of item response theory using R.New York,NY: Springer.ISBN-13:978-3-319-54204-1Examplesu<-c(1,0,1)b<-c(-1.0,0.0,1.0)a<-c(1.0,1.2,0.8)ability(2,u,b,a)#ability(2,u,b,a,c=rep(0,length(b)))theta.se<-ability(2,u,b,a)theta.sebirtr3 birtr The R Package for"The Basics of Item Response Theory Using R"DescriptionThe birtr package provides nine important functions:iccplot(),icccal(),icc(),iccfit(), groupinv(),tcc(),ability(),tif(),and rasch().DetailsThe iccplot()function plots an item characteristic curve under the two-parameter logistic model.The icccal()function computes the logistic deviate L,the exponent of negative L,the denomina-tor,and the value of probability of correct response for each of seven ability levels evenly spaced from-3to+3under the one-,two-,or three-parameter logistic item characteristic curve model.The icc()function plots an item characteristic curve under the one-,two-,or three-parameter logistic model.The iccfit()function plots the item characteristic curve and the simulated observed proportions of correct response from the one-,two-,or three-parameter logistic model.The groupinv()function plots the item characteristic curve and the two sets of simulated observed proportions of correct response from two groups under the one-,two-,or three-parameter logistic model.The tcc()function plots a test characteristic curve from a set of item parameters under the one-, two-,or three-parameter logistic model.The ability()function estimates the ability parameter and obtains the standard error of the es-timate given the item characteristic curve model,the response vector,and the set of known item parameters under the one-,two-,or three-parameter logistic model.The tif()function plots a test information function from a set of item parameters under the one-, two-,or three-parameter logistic model.The rasch()function yields estimates of item difficulty parameters and ability parameters under the one-parameter logistic Rasch model by the Birnbaum paradigm.Author(s)Seock-Ho Kim<*************>ReferencesBaker,F.B.,&Kim,S.-H.(2017).The basics of item response theory using R.New York,NY: Springer.ISBN-13:978-3-319-54204-14groupinv groupinv Group Invariance of Item ParametersDescriptionPlots the item characteristic curve and the two sets of simulated observed proportions of correct response from two groups under the one-,two-,or three-parameter logistic model.Usagegroupinv(mdl,t1l,t1u,t2l,t2u)Argumentsmdl1,2,or3representing the number of the model parameters.t1l a number indicating the lower bound of ability for group1.t1u a number indicating the upper bound of ability for group1.t2l a number indicating the lower bound of ability for group2.t2u a number indicating the upper bound of ability for group2.DetailsWhile the theoretical range of ability is from negative infinity to positive infinity,practical con-siderations usually limit the range of values from-3to+3.The default values are t1l=-3,t1u =-1,t2l=1,and t2u=3.With the number of item characteristic curve model parameters mdl the item parameters are randomly sampled from the uniform distributions;for example,under the three-parameter logistic model,b from the-3to3range,a from the0.2to2.8range,and c from the0to.35range.Each of the33ability levels from the-3to+3range with.1875interval,the observed proportion of correct response is generated from the binomial distribution for sample size of21.The ability levels and the observed proportions of correct response between t1l and t1u are used as the group1data,and the ability levels and the observed proportions of correct response between t2l and t2u are used as the group2data.The data from the pooled groups are used to obatin the plot that displays the set of item parameters.ReferencesBaker,F.B.,&Kim,S.-H.(2017).The basics of item response theory using R.New York,NY: Springer.ISBN-13:978-3-319-54204-1Examplesgroupinv(1)#groupinv(1,-3,-1,1,3)groupinv(2)#groupinv(2,-3,-1,1,3)groupinv(3)#groupinv(3,-3,-1,1,3)groupinv(2,-2,1,-1,2)icc5 icc Item Characteristic CurveDescriptionPlots an item characteristic curve under the one-,two-,or three-parameter logistic model.Usageicc(b,a,c)Argumentsb a single number representing the value of item difficulty.a a single number representing the value of item discrimination.c a single number representing the value of lower asymptote.DetailsWhile the theoretical range of ability is from negative infinity to positive infinity,practical consid-erations usually limit the range of values from-3to+3.Under the one-parameter logistic model, a=1and c=0.Under the two-parameter logistic model,c=0.The parameter c has a theoretical range from0to1,but in practice values above.35are not considered acceptable,hence use the range from0to.35for c.The vertical dotted line corresponds to the value of the item difficulty parameter.ReferencesBaker,F.B.,&Kim,S.-H.(2017).The basics of item response theory using R.New York,NY: Springer.ISBN-13:978-3-319-54204-1Examplesicc(1.5,1.3,.2)icc(a=1.3,b=1.5,c=.2)icc(1)#icc(1,1,0)icc(1,0.5)#icc(1,0.5,0)6icccal icccal Item Characteristic Curve CalculationsDescriptionComputes the logistic deviate L,the exponent of negative L,the denominator,and the value of probability of correct response for each of seven ability levels evenly spaced from-3to+3under the one-,two-,or three-parameter logistic item characteristic curve model.Usageicccal(b,a,c)Argumentsb a single number representing the value of item difficulty.a a single number representing the value of item discrimination.c a single number representing the value of lower asymptote.DetailsWhile the theoretical range of ability is from negative infinity to positive infinity,practical consid-erations usually limit the range of values from-3to+3.Under the one-parameter logistic model, a=1and c=0.Under the two-parameter logistic model,c=0.The parameter c has a theoretical range from0to1,but in practice values above.35are not considered acceptable,hence use the range from0to.35for c.ReferencesBaker,F.B.,&Kim,S.-H.(2017).The basics of item response theory using R.New York,NY: Springer.ISBN-13:978-3-319-54204-1Examplesicccal(1.5,1.3,.2)icccal(a=1.3,b=1.5,c=.2)icccal(1)#icccal(1,1,0)icccal(1,0.5)#icccal(1,0.5,0)iccfit7 iccfit Item Characteristic Curve FittingDescriptionPlots the item characteristic curve and the simulated observed proportions of correct response from the one-,two-,or three-parameter logistic model.Usageiccfit(mdl)Argumentsmdl1,2,or3representing the number of the model parameters.DetailsWhile the theoretical range of ability is from negative infinity to positive infinity,practical consider-ations usually limit the range of values from-3to+3.With the number of item characteristic curve model parameters mdl the item parameters are randomly sampled from the uniform distributions;for example,under the three-parameter logistic model,b from the-3to3range,a from the0.2to2.8 range,and c from the0to.35range.Each of the33ability levels from the-3to+3range with.1875 interval,the observed proportion of correct response is generated from the binomial distribution for sample size of21.The chi-square goodness-of-fit index is obtained and reported with the set of item parameters.ReferencesBaker,F.B.,&Kim,S.-H.(2017).The basics of item response theory using R.New York,NY: Springer.ISBN-13:978-3-319-54204-1Examplesiccfit(1)iccfit(2)iccfit(3)8rasch iccplot Item Characteristic Curve PlotDescriptionPlots an item characteristic curve under the two-parameter logistic model.Usageiccplot(b,a)Argumentsb a single number representing the value of item difficulty.a a single number representing the value of item discrimination.DetailsWhile the theoretical range of ability is from negative infinity to positive infinity,practical consid-erations usually limit the range of values from-3to+3.ReferencesBaker,F.B.,&Kim,S.-H.(2017).The basics of item response theory using R.New York,NY: Springer.ISBN-13:978-3-319-54204-1Examplesiccplot(0,1)iccplot(a=1,b=0)iccplot(0,1);par(new=TRUE);iccplot(-1.5,1)rasch Rasch Model CalibrationDescriptionYields estimates of item difficulty parameters and ability parameters under the one-parameter logis-tic Rasch model by the Birnbaum paradigm.Usagerasch(s,f)tcc9Argumentss a numeric vector representing the column sum for the J items.f a numeric vector representing the frequencies for the scores from1to J-1.DetailsWith data editing command lines,the item response data matrix of N by J is to be converted to the two vectors of the column sum s and the frequencies for the scores f.The two vectors are the input for the Birnbaum paradigm to calibrate the test.The function contains two other required functions,stage1and stage2.After obtaining the item and ability parameter estimates from the Birnbaum paradigm,bias correction methods are applied to the item parameter estimates and then to the ability parameter estimates.The estimates of item difficulty parameters b are reported in the console window.The estimates of ability parameters theta are not for individual examinees but for the raw score groups ranged from1to J-1.The function prints out the mean and the standard deviation of the item parameter estimates as well as those of the ability parameter estimates. ReferencesBaker,F.B.,&Kim,S.-H.(2017).The basics of item response theory using R.New York,NY: Springer.ISBN-13:978-3-319-54204-1Examplesrm(list=ls())#remove the existing objects in workspaces<-c(13,8,8,5,10,7,7,6,7,3)f<-c(1,2,2,4,1,1,0,0,4)rasch(s,f)tcc Test Characteristic CurveDescriptionPlots a test characteristic curve from a set of item parameters under the one-,two-,or three-parameter logistic model.Usagetcc(b,a,c)Argumentsb a numeric vector representing the values of item difficulty.a a numeric vector representing the values of item discrimination.c a numeric vector representing the values of lower asymptote.10tif DetailsWhile the theoretical range of ability is from negative infinity to positive infinity,practical consider-ations usually limit the range of values from-3to+3.The length of b should be the same as that of a and c.Each parameter c has a theoretical range from0to1,but in practice values above.35are not considered acceptable,hence use the range from0to.35for each c.Under the one-parameter logis-tic model,a=rep(1,length(b))and c=rep(0,length(b)).Under the two-parameter logistic model,c=rep(0,length(b)).ReferencesBaker,F.B.,&Kim,S.-H.(2017).The basics of item response theory using R.New York,NY: Springer.ISBN-13:978-3-319-54204-1Examplesb<-c(-2.0,-1.0,0.0,1.0,2.0)a<-c(0.5,0.75,1.0,0.75,0.5)c<-c(.2,.2,.2,.2,.2)tcc(b,a,c)tcc(a=a,b=b,c=c)tcc(b)#tcc(b,a=rep(1,length(b)),c=rep(0,length(b)))tcc(b,a)#tcc(b,a,c=rep(0,length(b)))tif Test Information FunctionDescriptionPlots a test information function from a set of item parameters under the one-,two-,or three-parameter logistic model.Usagetif(b,a,c)Argumentsb a numeric vector representing the values of item difficulty.a a numeric vector representing the values of item discrimination.c a numeric vector representing the values of lower asymptote.tif11DetailsWhile the theoretical range of ability is from negative infinity to positive infinity,practical consid-erations usually limit the range of values from-3to+3.The length of b should be the same as that of a and c.Each parameter c has a theoretical range from0to1,but in practice values above.35are not considered acceptable,hence use the range from0to.35for each c.Under the one-parameter logistic model,a=rep(1,length(b))and c=rep(0,length(b)).Under the two-parameter lo-gistic model,c=rep(0,length(b)).In case b to be a single number,then the plot contains the item informaiton function.Note that the maximum of the information value on the vertical axis of the graph is arbitrarily set to10.ReferencesBaker,F.B.,&Kim,S.-H.(2017).The basics of item response theory using R.New York,NY: Springer.ISBN-13:978-3-319-54204-1Examplesb<-c(-1.0,-0.5,0.0,0.5,1.0)a<-c(2.0,1.5,1.5,1.5,2.0)c<-c(.2,.2,.2,.2,.2)tif(b,a,c)tif(a=a,b=b,c=c)tif(b)#tif(b,a=rep(1,length(b)),c=rep(0,length(b)))tif(b,a)#tif(b,a,c=rep(0,length(b)))Index∗groupinvability,2groupinv,4∗iccfiticcfit,7∗iccploticcplot,8∗iccicc,5icccal,6∗raschrasch,8∗tcctcc,9∗tiftif,10ability,2birtr,3birtr-package(birtr),3groupinv,4icc,5icccal,6iccfit,7iccplot,8rasch,8tcc,9tif,1012。

R软件中的计量经济学程序包纵览

R软件中的计量经济学程序包纵览

R软件中的计量经济学程序包纵览《正文》R软件中的计量经济学程序包Base R ships with a lot of functionality useful for computational econometrics, in particular in the stats package. This functionality is complemented by many packages on CRAN, a brief overview is given below.There is also a considerable overlap between the tools for econometrics in this view and those in the task views on Finance, SocialSciences, and TimeSeries. Furthermore, the Finance SIG is a suitable mailing list for obtaining help and discussing questions about both computational finance and econometrics.The packages in this view can be roughly structured into the following topics. If you think that some package is missing from the list, please contact the maintainer.Basic linear regression(基础的线性回归)·Estimation and standard inference(估计和标准推断): Ordinary least squares (OLS) estimation for linear models is provided by lm() (from stats) and standard tests for model comparisons are available in various methods such as summary() and anova().·Further inference and nested model comparisons(进一步推断和嵌套模型比较): Functions analogous to the basic summary() and anova() methods that also support asymptotic tests ( z instead of t tests, and Chi-squared instead of F tests) and plug-in of other covariance matrices are coeftest() and waldtest() in lmtest. Tests of more general linear hypotheses are implemented in linearHypothesis() and for nonlinear hypotheses in deltaMethod() in car.·Robust standard errors(稳健标准误): HC and HAC covariance matrices are available in sandwich and can be plugged into the inference functions mentioned above.·Nonnested model comparisons(非嵌套模型比较): Various tests for comparing non-nested linear models are available in lmtest (encompassing test, J test, Cox test). The Vuong test for comparing other non-nested models is provided by nonnest2 (and specifically for count data regression in pscl).·Diagnost checking : The packages car and lmtest provide a large collection of regression diagonstics and diagnostic tests.Microeconometrics(微观计量经济学)·Generalized linear models (GLMs) (广义线性模型): Many standard microeconometric models belong to the family of generalized linear models and can be fitted by glm() from package stats. This includes in particular logit and probit models for modeling choice data and Poisson models for count data. Effects for typical values of regressors in these models can be obtained and visualized using effects. Marginal effects tables for certain GLMs can be obtained using the mfx and margins packages. Interactive visualizations of both effects and marginal effects are possible in LinRegInteractive.·Binary responses (二值响应): The standard logit and probit models (among many others) for binary responses are GLMs that can be estimated by glm() with family = binomial. Bias-reduced GLMs that are robust to complete and quasi-complete separation are provided by brglm. Discrete choice models estimated by simulated maximum likelihood are implemented in Rchoice. Heteroscedastic probit models (and other heteroscedastic GLMs) are implemented in glmx along with parametric link functions and goodness-of-link tests for GLMs.·Count responses(数值响应): The basic Poisson regression is a GLM that can be estimated by glm() with family = poisson as explained above. Negative binomial GLMs are available via glm.nb() in package MASS. Another implementation of negative binomial models is provided by aod, which also contains other models for overdispersed data. Zero-inflated and hurdle count models are provided in package pscl. A reimplementation by the same authors is currently under development in countreg on R-Forge which also encompasses separate functions for zero-truncated regression, finite mixture models etc.·Multinomial responses(多值响应): Multinomial models with individual-specific covariates only are available in multinom() from package nnet. Implementations with both individual- and choice-specific variables are mlogit and mnlogit. Generalized multinomial logit models (e.g., with random effects etc.) are in gmnl. Generalized additive models (GAMs) for multinomial responses can be fitted with the VGAM package. A Bayesian approach to multinomial probit models is provided by MNP. Various Bayesian multinomial models (including logit and probit) are available in bayesm. Furthermore, the package RSGHB fits various hierarchical Bayesian specifications based on direct specification of the likelihood function.·Ordered responses (排序响应): Proportional-odds regression for ordered responses is implemented in polr() from package MASS. The package ordinal provides cumulative link models for ordered data which encompasses proportional odds models but also includes more general specifications. Bayesian ordered probit models are provided by bayesm.·Censored responses(删失响应): Basic censored regression models (e.g., tobit models) can be fitted bysurvreg() in survival, a convenience interface tobit() is in package AER. Further censored regression models, including models for panel data, are provided in censReg. Interval regression models are in intReg. Censored regression models with conditional heteroscedasticity are in crch. Furthermore, hurdle models for left-censored data at zero can be estimated with mhurdle. Models for sample selection are available in sampleSelection and semiparametric extensions of these are provided by SemiParSampleSel. Package matchingMarkets corrects for selection bias when the sample is the result of a stable matching process (e.g., a group formation or college admissions problem).·Truncated responses(截断响应): crch for truncated (and potentially heteroscedastic) Gaussian, logistic, and t responses. Homoscedastic Gaussian responses are also available in truncreg.·Fraction and proportion responses : Fractional response models are in frm. Beta regression for responses in (0, 1) is in betareg and gamlss.·Miscellaneous(其他): Further more refined tools for microeconometrics are provided in the micEcon family of packages: Analysis with Cobb-Douglas, translog, and quadratic functions is in micEcon; the constant elasticity of scale (CES) function is in micEconCES; the symmetric normalized quadratic profit (SNQP) function is in micEconSNQP. The almost ideal demand system (AIDS) is in micEconAids. Stochastic frontier analysis (SFA) is in frontier and certain special cases also in sfa. Semiparametric SFA in is available in semsfa and spatial SFA in spfrontier and ssfa. The package bayesm implements a Bayesian approach to microeconometrics and marketing. Estimation and marginal effect computations for multivariate probit models can be carried out with mvProbit. Inference for relative distributionsis contained in package reldist.Instrumental variables(工具变量)·Basic instrumental variables (IV) regression(基础工具变量回归): Two-stage least squares (2SLS) is provided by ivreg() in AER. Other implementations are in tsls() in package sem, in ivpack, and lfe (with particular focus on multiple group fixed effects).·Binary responses(二值响应): An IV probit model via GLS estimation is available in ivprobit. The LARF package estimates local average response functions for binary treatments and binary instruments.·Panel data (面板数据): Certain basic IV models for panel data can also be estimated with standard 2SLS functions (see above). Dedicated IV panel data models are provided by ivfixed (fixed effects) and ivpanel (between and random effects).·Miscellaneous(其他): REndo fits linear models with endogenous regressor using various latent instrumental variable approaches. ivbma estimates Bayesian IV models with conditional Bayes factors. ivlewbel implements the Lewbel approach based on GMM estimation of triangular systems using heteroscedasticity-based IVs.Panel data models(面板数据模型)·Panel-corrected standard errors (面板修正的标准误): A simple approach for panel data is to fit the pooling (or independence) model (e.g., via lm() or glm()) and only correct the standard errors. Different types of panel-corrected standard errors are available in multiwayvcov, clusterSEs, pcse, clubSandwich, plm, and geepack, respectively. The latter two require estimation of the pooling/independence models via plm() and geeglm() from the respective packages (which also provide other types of models, see below).·Linear panel models(线性面板模型): plm, providing a wide range of within, between, and random-effect methods (among others) along with corrected standard errors, tests, etc. Another implementation of several of these models is in Paneldata. Various dynamic panel models are available in plm and dynamic panel models with fixed effects in OrthoPanels.·Generalized estimation equations and GLMs(广义估计方程和广义线性模型): GEE models for panel data (or longitudinal data in statistical jargon) are in geepack. The pglm package provides estimation of GLM-like models for panel data.·Mixed effects models (混合效应模型): Linear and nonlinear models for panel data (and more general multi-level data) are available in lme4 and nlme.·Instrumental variables(工具变量): ivfixed and ivpanel, see also above.·Heterogeneous time trends(差异时间趋势): phtt offers the possibility of analyzing panel data with large dimensions n and T and can be considered when the unobserved heterogeneity effects are time-varying.·Miscellaneous(其他): Multiple group fixed effects are in lfe. Autocorrelation and heteroscedasticity correction in are available in wahc and panelAR. PANIC Tests of nonstationarity are in PANICr. Threshold regression and unit root tests are in pdR. The panel data approach method for program evaluation is available in pampe.Further regression models(进一步回归模型)·Nonlinear least squares modeling(非线性最小二乘模型): nls() in package stats.·Quantile regression(分位数回归): quantreg (including linear, nonlinear, censored, locally polynomial and additivequantile regressions).·Generalized method of moments (GMM) and generalized empirical likelihood (GEL)(广义矩估计方法和广义经验似然估计): gmm.·Spatial econometric models(空间计量模型): The Spatial view gives details about handling spatial data, along with information about (regression) modeling. In particular, spatial regression models can be fitted using spdep and sphet (the latter using a GMM approach). splm is a package for spatial panel models. Spatial probit models are available in spatialprobit.·Bayesian model averaging (BMA)(贝叶斯模型平均): A comprehensive toolbox for BMA is provided by BMS including flexible prior selection, sampling, etc. A different implementation is in BMA for linear models, generalizable linear models and survival models (Cox regression).·Linear structural equation models(线性解构方程模型): lavaan and sem. See also the Psychometrics task view for more details.·Simultaneous equation estimation(联立方程估计): systemfit.·Nonparametric kernel methods(非参数核方法): np.·Linear and nonlinear mixed-effect models(线性核非线性混合效应模型): nlme and lme4.·Generalized additive models (GAMs) (广义加性模型): mgcv, gam, gamlss and VGAM.·Extreme bounds analysis(极值边界分析): ExtremeBounds.·Miscellaneous(其他): The packages VGAM, rms and Hmisc provide several tools for extended handling of (generalized) linear regression models. Zelig is a unified easy-to-use interface to a wide range of regression models.Time series data and models(时间序列数据和模型)· The TimeSeries task view provides much more detailed information about both basic time series infrastructure and time series models. Here, only the most important aspects relating to econometrics are briefly mentioned. Time series models for financial econometrics (e.g., GARCH, stochastic volatility models, or stochastic differential equations, etc.) are described in the Finance task view.·Infrastructure for regularly spaced time series(规则间隔时间序列的基础设施): The class 'ts' in package stats is R's standard class for regularly spaced time series (especially annual, quarterly, and monthly data). It can be coerced back and forth without loss of information to 'zooreg' from package zoo.·Infrastructure for irregularly spaced time series(不规则间隔时间序列的基础设施): zoo provides infrastructure for both regularly and irregularly spaced time series (the latter via the class 'zoo') where the time information can be of arbitrary class. This includes daily series (typically with 'Date' time index) or intra-day series (e.g., with 'POSIXct' time index). An extension based on zoo geared towards time series with different kinds of time index is xts. Further packages aimed particularly at finance applications are discussed in the Finance task view.·Classical time series models(经典时间序列模型): Simple autoregressive models can be estimated with ar() and ARIMA modeling and Box-Jenkins-type analysis can be carried out with arima() (both in the stats package). An enhanced version of arima() is in forecast.·Linear regression models(线性回归模型): A convenience interface to lm() for estimating OLS and 2SLS models based on time series data is dynlm. Linear regression models with AR errorterms via GLS is possible using gls() from nlme.·Structural time series models(结构时间序列模型): Standard models can be fitted with StructTS() in stats. Further packages are discussed in the TimeSeries task view.·Filtering and decomposition(筛选和分解): decompose() and HoltWinters() in stats. The basic function for computing filters (both rolling and autoregressive) is filter() in stats. Many extensions to these methods, in particular for forecasting and model selection, are provided in the forecast package.·Vector autoregression (向量自回归): Simple models can be fitted by ar() in stats, more elaborate models are provided in package vars along with suitable diagnostics, visualizations etc.A Bayesian approach is available in MSBVAR.·Unit root and cointegration tests(单位根和协整检验): urca, tseries, CADFtest. See also pco for panel cointegration tests.·Miscellaneous(其他):o tsDyn - Threshold and smooth transistion models.o midasr - MIDAS regression and other econometric methods for mixed frequency time series data analysis.o gets - GEneral-T o-Specific (GETS) model selection for either ARX models with log-ARCH-X errors, or a log-ARCH-X model of the log variance.o tsfa - Time series factor analysis.o dlsem - Distributed-lag linear structural equation models.o apt - Asymmetric price transmission models.Data sets(数据集)·Textbooks and journals(教科书和期刊): Packages AER, Ecdat, and wooldridge contain a comprehensive collections of data sets from various standard econometric textbooks as well asseveral data sets from the Journal of Applied Econometrics and the Journal of Business & Economic Statistics data archives. AER and wooldridge additionally provide extensive sets of examples reproducing analyses from the textbooks/papers, illustrating various econometric methods.·Canadian monetary aggregates (加拿大货币总计): CDNmoney.·Penn World Table (佩恩表): pwt provides versions 5.6, 6.x, 7.x. Version 8.x and 9.x data are available in pwt8 and pwt9, respectively.·Time series and forecasting data(时间序列和预测数据): The packages expsmooth, fma, and Mcomp are data packages with time series data from the books 'Forecasting with Exponential Smoothing: The State Space Approach' (Hyndman, Koehler, Ord, Snyder, 2008, Springer) and 'Forecasting: Methods and Applications' (Makridakis, Wheelwright, Hyndman, 3rd ed., 1998, Wiley) and the M-competitions, respectively.·Empirical Research in Economics(经济学实证研究): Package erer contains functions and datasets for the book of 'Empirical Research in Economics: Growing up with R' (Sun, forthcoming).·Panel Study of Income Dynamics (PSID)(收入动态追踪面板数据): psidR can build panel data sets from the Panel Study of Income Dynamics (PSID).· US state- and county-level panel data(美国州和县级面板数据): rUnemploymentData.· World Bank data and statistics(世界银行数据和统计): The wbstats package provides programmatic access to the World Bank API.Miscellaneous(其他)·Matrix manipulations(矩阵操作): As a vector- and matrix-based language, base R ships with many powerful tools for doing matrix manipulations, which are complemented by the packages Matrix and SparseM.·Optimization and mathematical programming(优化和数学编程): R and many of its contributed packages provide many specialized functions for solving particular optimization problems, e.g., in regression as discussed above. Further functionality for solving more general optimization problems, e.g., likelihood maximization, is discussed in the the Optimization task view.·Bootstrap(自助法): In addition to the recommended boot package, there are some other general bootstrapping techniques available in bootstrap or simpleboot as well some bootstrap techniques designed for time-series data, such as the maximum entropy bootstrap in meboot or the tsbootstrap() from tseries.·Inequality(不平等): For measuring inequality, concentration and poverty the package ineq provides some basic tools such as Lorenz curves, Pen's parade, the Gini coefficient and many more.·Structural change (结构突变): R is particularly strong when dealing with structural changes and changepoints in parametric models, see strucchange and segmented.·Exchange rate regimes(汇率制度): Methods for inference about exchange rate regimes, in particular in a structural change setting, are provided by fxregime.·Global value chains (全球价值链): T ools and decompositions for global value chains are in gvc and decompr.·Regression discontinuity design(断点回归设计): A varietyof methods are provided in the rdd, rddtools, rdrobust, and rdlocrand packages.CRAN packages:· AER (core)· aod· apt· bayesm· betareg· BMA· BMS· boot· bootstrap· brglm· CADFtest· car (core)· CDNmoney· censReg· clubSandwich· clusterSEs· crch· decompr· dlsem· dynlm· Ecdat· effects· erer· expsmooth· ExtremeBounds· fma· forecast (core)· frm· frontier· fxregime· gam· gamlss· geepack· gets· glmx· gmm· gmnl· gvc· Hmisc· ineq· intReg· ivbma· ivfixed· ivlewbel· ivpack· ivpanel· ivprobit· LARF· lavaan· lfe· LinRegInteractive · lme4· lmtest (core) · margins· MASS· matchingMarkets · Matrix· Mcomp· meboot· mfx· mgcv· mhurdle· micEcon· micEconAids · micEconCES · micEconSNQP · midasr· mlogit· mnlogit· MNP· MSBVAR · multiwayvcov · mvProbit · nlme· nnet· nonnest2 · np· ordinal· OrthoPanels · pampe· panelAR· Paneldata · PANICr· pco· pcse· pdR· pglm· plm (core)· pscl· psidR· pwt· pwt8· pwt9· quantreg· Rchoice· rdd· rddtools· rdlocrand· rdrobust· reldist· REndo· rms· RSGHB· rUnemploymentData · sampleSelection · sandwich (core) · segmented· sem· SemiParSampleSel · semsfa· sfa· simpleboot· SparseM· spatialprobit· spdep· spfrontier· splm· ssfa· strucchange · survival · systemfit · truncreg · tsDyn· tseries (core) · tsfa· urca (core) · vars· VGAM· wahc· wbstats · wooldridge · xts· Zelig· zoo (core)。

VAR中变量非平稳时,如何进行脉冲分析

VAR中变量非平稳时,如何进行脉冲分析

OIL PRICE SHOCKS AND EMERGING STOCK MARKETS:A GENERALIZED VAR APPROACHMAGHYEREH, Aktham* AbstractThis study examines the dynamic linkages between crude oil price shocks and stock market returns in 22 emerging economies. The vector autoregression (VAR) analysis is carried on daily data for the period spanned from January 1, 1998 to April 31, 2004. This study utilized the generalized approach to forecast error variance decomposition and impulse response analysis in favor of the more traditional orthogonal ized approach. Inconsistent with prior research on developed economies, the findings imply that oil shocks have no significant impact on stock index returns in emerging economies. The results also suggest that stock market returns in these economies do not rationally signal shocks in the crude oil market.JEL Classification: G10, G12.Keywords: Oil Prices, Emerging stock markets, VAR model.1. IntroductionThe oil price shock of 1973 and the subsequent recession give rise to a plethora of studies analyzing the interrelation between economic variables and oil price changes. The early studies include Pierce and Enzler (1974), Rasche and Tatom (1977), and Draby (1982), all of which documented and explained the inverse relationship between oil price increases and aggregate economic activity. Later empirical studies-such as, Hickman et al. (1987), Jones and Leiby (1996), Hooker (1999), Hammes and Wills (2003) and Leigh et al. (2003)-* Aktham Maghyereh is Assistant Dean at the Faculty of Economics and Business Administration, the Hashemite University, Jordan. E-mail: maghyreh@.joconfirm the inverse relationship between oil prices and aggregateeconomic activity.Although the bulk of the empirical studies focus on the relationbetween economic activity and oil price changes, it is surprising thatfew studies have been conducted on the relationship between financial markets and oil price shocks- and those mainly for a fewindustrialized countries such as the United States, United Kingdom,Japan, and Canada. For example, Jones and Kaul (1992) examine theeffect of oil prices on stock prices in the U.S. They find an effect ofoil prices on aggregate real stock returns, including a lagged effect,in the period 1947 to 1991. In more recent study, Jones and Kaul(1996) test whether the reaction of international stock markets to oil shocks can be justified by current and future changes in real cash flows and/or changes in expected returns.They find that in the postwar period, the reaction of United States and Canadian stock prices to oil shocks can be completely accounted for by the impact of these shocks on real cash flows. In contrast, the results for both the United Kingdom and Japan are not as strong. In an important study, Haung et al. (1996) examine the link between daily oil future returns and daily U.S. stock returns. The evidence suggests that oil futures returns do lead some individual oil company stock returns but oil future returns do not have much impact on general market indices. Gjerde and Saettem (1999) demonstrate that stock returns have a positive and delayed response to changes in industrial production and that the stock market responds rationally to oil price changes in the Norwegian market. Sadorsky (1999) finds that oil prices play an important role in affecting real stock returns.Although all of these studies recognize the importance of causal relationships between oil prices and stock market returns in some industrial countries, the results from such studies cannot be generalized to other countries. Consequently, this paper extends the understanding on the dynamic relationship between oil prices and stock market return by using data from 22 emerging stock markets, which helps to fill in the gap. Specifically, this paper investigates thedynamic interactions between crude oil prices and stock prices in alarge sample of emerging economies.If oil plays a prominent role in an economy, one would expectchanges in oil prices to be correlated with changes in stock prices.Specifically, it can be argued that if oil affects real economic activity, it will affect earnings of companies through which oil is adirect or indirect cost of operation. Thus, an increase in oil priceswill cause expected earnings to decline, and this would bring aboutan immediate decrease in stock prices if the stock market effectivelycapitalizes the cash flow implications of the oil price increases. If thestock market is inefficient, stock returns might be slowly.Given the evidence of stronger linkages between crude oil pricesand stock markets in developed economies, this study considers thisissue in the emerging economies. The study examines the dynamiclinkages between crude oil prices and stock market returns in manyemerging economies and essentially asks two questions. To whatextent are price changes or returns in crude oil market lead stockreturns in emerging markets? How efficiently are innovations/shocksin crude oil market transmitted to the stock markets in the emerging economies? In answering these questions it is hoped that some light may shed on the importance of the crude oil on economic output in the emerging economies. The vector autoregression (VAR) technique that is employed in this study is well suited to answering these questions.The study utilized the generalized approach to forecast error variance decomposition and impulse response analysis in favor of the more traditional orthogonalized approach. The problem with the orthogonalized approach to variance decomposition and impulse response analysis is that the order of the variables in the VAR determines the outcome of the results. The generalized approach is invariant to the ordering of the variables in the VAR and produces one unique result.The paper proceeds as follows. Section 2 describes the data used in the paper. Section 3 provides an overview of the methodological issues. Section 4 presents the empirical evidence. Section 5 provides some concluding remarks.2. DataThe stock market data in this paper are obtained from Morgan Stanley Capital International (MSCI). The sample is daily encompasses the period from 1 January 1998 to 31 April 2004 and contains U.S. dollar dominated value-weighted stock market indices for the following 22 emerging countries: Argentina, Brazil, Chile, China, Czech Republic, Egypt, Greece, India, Indonesia, Jordan, Korea, Malaysia, Mexico, Morocco, Hungary, Pakistan, Philippines, Poland, South Africa, Taiwan, Thailand, and Turkey.We choose to use the MSCI indices rather than other local stock price indices for several reasons. First, these indices are constructed on a consistent basis by the MSCI, making cross-country comparison more meaningful. Second, these indices are value-weighted reflects a substantial percentage of total market capitalization which could minimize the problem of autocorrelation in returns result from nonsynchronous trading. Third, MSCI indices are widely employed in the literature on the basis of the degree of comparability and avoidance of dual listing.The crude oil market is the largest commodity market in the world. Total world consumption equals around 80 million barrels a day in 2003. Prices of three types of oil- Brent, West Texas Intermediate and Dubai-serve as a benchmark for other types of crude oil. Processing costs and therefore prices of oil depend on two important characteristics: sulphur content and density. Oil that has a low sulphur content ("sweet") and a low density ("light") is cheaper than process than oil that has a high sulphur content ("sour") and high density ("heavy"). For instance the price of West Texas Intermediate is generally higher than Brent oil as it is sweeter and lighter than Brent oil. Of total world oil consumption of about 80 million barrelsa day in 2003, Brent oil serves as a benchmark for about 50 millionbarrels a day, West Texas Intermediate for about 15 million barrels aday and Dubai for about 15 million barrels a day.Even though price differences do exist, crude oil prices tend tomove very closely together. Since Brent oil serves as a benchmark in the crude oil market, daily closing prices of crude oil Brent are usedas our primary proxy for the world price of crude oil1. The dailyclosing prices for crude oil Brent for the period from 1 January 1995to 31 April 2004 are obtained from the U.S. Energy InformationAdministration. Finally, consistent with convention, all data used inthis study has been transformed by taking the natural logarithm ofthe raw data.3.- MethodologyThe unrestricted vector autoregression (VAR) approach used inthis study was developed by Sims (1980). The VAR was developedto account for problems with intervention and transfer functionanalysis. This model provides a multivariate framework wherechanges in a particular variable are related to changes in its own lags and to changes in other variables. The VAR treats all variables as jointly endogeneous and imposes no a priori restrictions on the structural relationships, if any, between variables being analyzed. Because the VAR expresses the dependent variables in terms of only predetermined lagged variables, the VAR model is a reduced form model.An argument that naturally arises in the context of a VAR iswhether one should use levels or first differences in the VAR.Clearly if the variable are I(0) processes this is not an issue. Thedifficultly arises, however, when the variables need to be differencedto get a stationary process, as they almost invariably do when dealingstock index data. Because of the information that is lost in 1We also estimated the results using daily for Arab light, Arab Medium, Dubai and West Texas as alternatives for the world price of oil and found these measures did not substantively affect our results.differencing, Sims (1980) and Doan (1992) have argued against it. The majority view, highlighted by Granger and Newbold (1974) and Phillips (1986) is that stationary data should be used since non-stationary data can lead to spurious regression results. Further, Toda and Yamamoto (1995) noted that conventional asymptotic theory is, in general, not applicable to hypothesis testing in levels VARs if the variables are integrated, say I(1). Thus, as the first step, the order of integration of the variables is tested. Tests for the presence of a unit root based on the work of Dickey and Fuller (1979, 1981), Perron (1988), Phillips (1987), Phillips and Perron (1988)2, and Kwiatkowski et al . (1992)3 are used to investigate the degree of integration of the variables used in the empirical analysis. If a I(1) process does exist, the second step involves estimation of the VAR model with first differences 4, otherwise VAR is estimated in levels.To determine the appropriate number of lag length of the VAR2 makes a semi-parametric correlation for autocorrelation and is more robust in the case of weakly autocorrelated and heteroskedastic regression residuals.3 The KPSS procedure assumes the univariate series can be decomposed into the sum of a deterministic trend, random walk, and stationary I(0) disturbance and is based on a Lagrange Multiplier score testing principle. This test reverses the null and alternative hypothesis. A finding favorable to a unit root in this case requires strong evidence against the hypothesis of stationarity.4 Earlier studies of stock returns have shown that stock returns exhibit a number of important seasonalities (e.g. January and week-end effects). These sesonalities are accounted for in our analysis by introducing dummy variables in the VAR model. Furthermore, important events in oil and equity markets during the period under investigation are the September 11th attacks and its subsequent and the U.S. invitation of Iraq on March 19. Oil and equity markets fluctuated dramatically as a consequence of these events, therefore these events are also accounted for in the analysis by introducing dummy variables.Next, the generalized variance decomposition and generalizedimpulse response functions are employed to analysis the short-rundynamics of the variables. The purpose of the investigation is to findhow each of emerging markets responds to shocks by the crude oilmarket. The forecast-error of generalized variance decompositionanalysis reveals information about the proportion of the movements in market returns due to its “own” shocks versus shocks to the oilcrude market. The dynamic responses of stock market to innovationsin the c rude oil market can also be traced out using the generalizedimpulse response analysis. Plotting the generalized impulse responsefunctions is a particular way to explore the response of a stockmarket to a shock immediately or with various lags. Unlike t h eorthogonalized variance decomposition and impulse response functions obtained using the Choleskey factorization, the generalized variance decomposition and impulse response functions are unique solution and invariant to the ordering of the variables in the VAR (Koop et al. 1996; and Pesaran and Shin, 1998).Another argument that arises in the context of an unrestricted VAR is whether this model should be used where the variables in the VAR are cointegrated. There is a body of literature that supports the use of a vector error correction model (VECM), or cointegrating VAR if variables are integrated, I(1). Because the cointegrating vectors bind the long run behavior of the variables, the VECM is expected to produce results in the impulse response analysis and variance decomposition that more accurately reflect the relationship between the variables than the standard unrestricted VAR.It has been argued, however, that in the short run unrestricted VARs perform better than a cointegrating VAR (see for example, Naka and Tufte, 1997). Furthermore, Engle and Yoo (1987), Clements and Hendry (1995), and Hoffman and Rasche (1996) have shown that an unrestricted VAR is superior (in terms of forecast variance) to a restricted VECM at short horizons when the restriction is true. Naka and Tufte (1997) also studied the performance of VECMs and unrestricted VARs for impulse response analysis over the short-run and found that the performance of the two methods isnearly identical. This suggests that abandoning vector autoregressions for short horizon work is premature, especially when one considers their low computational burden. Although Johansen multivariate cointegration analysis is carried out in this study and cointegrating relationships founds, unrestricted VARs are used impulse response analysis.4. Empirical Resultsstationary variables, these results necessitated the use of first differenced data to carry out the VAR analysis.As we mentioned above, the interpretation of the VAR model can brought to light through the generalized variance decomposition analysis and the estimation of the generalized impulse response functions. The results of variance decomposition are presented in Table 2. The reported numbers indicate the percentage of the forecast error in each stock market that can be attributed to innovations in the crude oil market at four different time horizons: one day, 5, 10 and 15-day ahead. The results of generalized variance decomposition analysis and generalized impulse response function provide the same conclusions regardless of order of decomposition since their estimation is independent of the ordering.The generalized decomposition tends to suggests that the crude oil price shocks have no significant impact on any of emerging stock market under investigation. Specifically, in all cases the crude oil shocks explain less than 2% of the forecast errors variances and in 16 of the 22 emerging markets this ratio falls to less than 1%.Table 1. Unit Root TestsLevel First Difference Variable ADF PP KPSS ADF PP KPSS Argentina -1.0 -1.1 2.9* -16.1* -36.4* 0.3 Brazil -1.3 -1.3 1.4* -16.1* -30.5* 0.2 China -1.1 -1.1 1.4* -13.5* -28.1* 0.3 Czech Rep. -1.5 -1.4 3.1* -15.5* -32.5* 0.3 Egypt -1.4 -1.2 3.5* -15.1* -30.5* 0.4 Greece 0.1 -0.1 2.4* -16.8* -33.5* 0.2 India -1.0 -0.9 3.1* -14.6* -34.4* 0.6 Indonesia -1.1 -1.0 1.3* -15.1* -31.5* 0.3 Jordan -1.4 -1.3 1.8* -15.8* -31.2* 0.3 Korea 2.1 1.9 2.5* -16.2* -34.8* 1.2 Malaysia -1.6 -1.6 0.8* -16.4* -34.6* 0.1 Mexico -2.2 -2.3 0.1 -14.7* -30.8* 0.4 Morocco -2.5 -2.5 0.2 -16.8* -31.5* 0.1 Hungary -1.7 -1.6 2.9* -14.6* -30.7* 0.6 Pakistan -1.0 -0.9 2.7* -15.2* -32.8* 0.8 Philippines -0.4 -0.5 0.9* -14.7* -34.3* 0.5 Poland -0.4 -0.5 1.7* -14.7* -34.3* 0.3-1.1 -1.2 3.2* -14.4* -30.1* 0.2 SouthAfricaTaiwan -2.5 -2.4 1.6* -16.1* -30.8* 0.1 Thailand -1.7 -1.7 2.5* -15.3* -32.8* 0.2 Turkey -1.4 -1.4 0.9* -15.1* -34.1* 0.3 Oil Price -0.9 -1.7 0.3** -25.1* -83.2* 0.4-3.4 -3.4 0.7 -3.4 -3.4 0.7 CriticalValue 1%Critical-2.9 -2.9 0.5 -2.5 -2.9 0.5 Value 5%Notes: *and ** indicate statistical significant at the 1% and 5% level, respectively. The Augmented Dickey-Fuller (ADF) and the Phillips-Perron (PP) tested the null hypothesis of that the relevant series contains a unit root I(1) against the alternative that it does not, while the Kwiatowski-Pillips-Schmidt-Shin (KPSS) tested the null hypothesis that the series are I(0). The critical values for the ADF and PP are obtained from Dickey-Fuller (1981) while the KPSS critical values are obtained from Kwiatkowski et al. (1992).Table 2. Generalized decomposition of forecast error in emergingstock markets in response to shocks in the crude oil market (%)5 days 10 days 15 daysArgentina 0.622064 0.634352 0.641797Brazil 0.181891 0.237485 0.255282China 0.076167 0.053178 0.045921Czech Republic 0.169356 0.245609 0.270753Egypt 0.065641 0.086715 0.093538Greece 1.146167 1.393299 1.546380India 0.212965 0.731871 1.074984Indonesia 0.014805 0.036561 0.049455Jordan 0.172647 0.586863 0.855067Korea 1.703050 2.020706 2.028246Malaysia 1.375227 2.005126 2.384872Mexico 0.042720 0.178622 0.261737Morocco 0.022182 0.015533 0.012700Hungary 0.117332 0.076421 0.059594Pakistan 0.110283 0.272700 0.370517Philippines 0.041558 0.036562 0.034073Poland 0.041558 0.036562 0.034073South Africa 1.130735 1.734103 2.051688Taiwan 1.115818 1.353554 1.501680Thailand 0.157792 0.530656 0.817114Turkey 2.101294 2.381148 2.568307Furthermore, the results show some interesting differences acrosscountries in response to the oil market shocks, depending on theenergy intensity of consumption and production. Specifically, the impact of oil shocks on stock m arket is highest in the largest Asianand Emerging Europe economies, as they have higher energyintensity consumption than most other emerging economies. Forexample, at the 15-day horizons, the percentage of error variance of astock market explained by innovations in the crude oil market is 2.57for Turkey followed by 2.38 for Malaysia. The Poland marketappears to be the least influence by the oil market.Turning to the question of how effectively innovations may transmit from the oil market to the emerging stock markets, Figure 1 plots the responses of each of the twenty two emerging stock markets to a one standard error shock in the oil market. The plots in Figure 1 show that innovations in the oil market are slowly transmitted in all of the emerging stock markets with markets responding to the oil shock two day after the shock.The speed with which the responses taper off to zero after the initial shock is felt for the most markets on day 4. Only six markets namely: Argentina, Brazil, China, Czech Republic Egypt and Greece, responses continuous until day 7. These results may indicate that the emerging markets are inefficient in transmitting innovations/shocks in the oil market. The inefficiency in responses to a shock in the oil market is also reflected in the inaccuracy of the initial response, to the shock. However, the small size of the responses (between 0.00051 to 0.00126, on day 2) reflecting that the oil market is very weak in influencing stock markets in emerging economies.5.- ConclusionThis study examines the dynamic linkages between oil price shocks and stock market returns in 22 emerging economies. Vector autoregression (VAR) analysis is carried on daily data for the period, January 1, 1998 to April 31, 2004. This study utilized the generalized approach to forecast error variance decomposition and impulse response analysis in favor of the more traditional orthogonalized approach. Inconsistent with the pervious empirical studies in developed economies, the results from the variance decomposition analysis provided very weak evidence that there is a relationship between the crude oil price shocks and stock market returns in the emerging economies. Furthermore, the results from impulse analysis reveal that innovations in the oil market are slowly transmitted in the emerging stock markets. These results suggest that stock markets in the emerging economies are inefficient in transmission of new information of the oil market.These results may also indicate that the importance of oil price for the aggregate economy, especially inemerging economies, is greatly over-estimated. These results may also suggest that the stock market returns in the emerging economies do not rationally signal changes in the crude oil prices.R EFERENCESClements, M.P. and D.F. Hendry, 1995, "Forecasting in Cointegrated System," Journal of Applied Econometrics, 10, 127-146.Darby, M. R., 1982, "The Price of Oil and World Inflation and Recession," American Economic Review, 72, 738-751.Dickey, D., W.A. Fuller, 1979, "Distribution of the Estimates for Autoregressive Time Series with a Unit Root," Journal of the American Statistical Association, 74, 427-0431.Dickey, D., W.A. Fuller, 1981, "Likelihood Ratio Statistics for Autoregressive Time Series with a Unit Root," Econometrica, 49, 1057-1072.Doan, T. 1992, RATS User's Manual, Evanston III: Estima.Engle, R.F. and B.S. Yoo, 1987, "Forecasting and Testing in Cointegrated Systems," Journal of Econometrics, 35, 143-159. Granger, C.W.J and P. Newbold, 1994, "Spurious Regressions in Econometrics," Journal of Econometrics, 2, 111-120.Hammes, D. and D. Wills, 2003, “Black Gold: The End of Bretton Woods and the Oil Price Shocks of the 1970s,” Working Paper, University of Hawaii Hilo.Hickman, B., H. Huntington, and J. Sweeney, 1987, Macroeconomic Impacts of Energy Shocks, Amsterdam: north-Holland. Hoffman, D.L. and R.H. Rasche, 1996, "Assessing Forecast Performance in a Cointegrated System," Journal of Applied Econometrics, 11, 495-517.Hooker, M. 1999, "Are O il Shocks Inflationary? Asymmetric and Nonlinear Specifications versus Changes in Regime," Working Paper, Federal Reserve Board of Governors.Huang, R. D., R. W. Masulis, and H. R. Stoll, 1996, "Energy Shocks and Financial Markets," 27. The Journal of Future Markets, 16, 1-25.Jones, C. M. and G. Kaul, 1992, "Oil and Stock Markets," Journal of Finance, 51, 463-491.Jones, C. M. and G. Kaul, 1992, "Oil and Stock Markets," Working Paper, University of Michigan.Jones, D. W. and P. Leiby, 1996, "The Macroeconomic Impacts of Oil Price Shocks: A review of the Literature and Issues," Working Paper, Oak Ridge National Laboratory.Kwiatkowski, D., P.C.B. Phillips, P. Schmidt, and Y. Shim, 1992, "Testing the Null Hypothesis of Stationarity Against the Alternative of a Unit Root," Journal of Econometrics, 54, 159-178.Leigh, A., J. Wolfers, and E. Zitzewitz, 2003, "What do financial Markets Think about the War of Iraq?" Working Paper, Stanford Graduate School of Business.Naka, A. and D. Tufte, 1997, "Examining Impulse Response Functions in Cointegrated Systems," Applied Economics, 29, 1593-1603.Perron, P., 1988, "Trends and Random Walks in Macroeconomic Time: Series Further Evidence from a New Approach," Journal of Economic Dynamic and Control, 12, 297-332.Phillips, P.C.B. and P. Perron, 1988, "Testing for a Unit Root in Time Series regression," Biometrika, 75, 335-346.Phillips, P.C.B., 1986, "Understanding Spurious Regressions in Econometrics," Journal of Econometrics, 33, 311-340.Phillips, P.C.B., 1987, "Time Series Regression with a Unit Root," Econometrica, 55, 277-347.Pierce J. L., and J. E. Jared, 1974, "the Effects of External Inflationary Shocks," Brooking Papers on Economic Activity, 1, 13-61.Rasche, R. H., and J. A. Tatom, 1977, "The effect of the New energy Regime on Economic Capacity, Production and Prices," Economic Review, 59, 2-12.Sadorsky, P., 1999, "Oil Price Shocks and Stock Market Activity," Energy Economics, 21, 449-469.Sims, C. A., 1980, "Macroeconomics and reality," Econometrica, 48, 1-48.Toda, B.H. and T. Yamanoto, 1995, "Statistical Inference in Vector Autoregressions with Possibly Int.____________________Journal IJAEQS published by AEEADE: c.es/economet/eaa.htm。

进口商品与国内商品的替代关系研究综述

进口商品与国内商品的替代关系研究综述

东方企业文化·天下智慧 2011年8月207进口商品与国内商品的替代关系研究综述徐晓楠(浙江工商大学,杭州,310018)摘 要:随着人民生活水平的不断提高,进口商品的消费比例在国民消费中所占比例也越来越高。

从而衍生出对国内商品与进口商品之间的关系的研究。

从国内商品消费和进口商品消费的角度出发来研究国内商品与进口商品之间的关系,国内外学者在这方面进行了深入细致的研究,在模型构建、模型拓展、内生理论延伸,外部影响因素等方面分别从理论和实证两个方面开展,来论证两者之间是否存在替代或是互补关系。

关键词:进口商品与国内商品 替代弹性 消费 中图分类号:F224 文献标识码:A 文章编号:1672—7355(2011)08—0207—01 在开放的经济体中,国民消费分为国内商品消费和进口商品消费两类。

对于需要增大消费,扩大内需的中国经济来说,国内消费的稳定增长是保持中国经济持续快速增长的重要动力。

进口商品消费与国内商品消费在经济中相互之间的关系,很多学者从不同的角度进行了细致的研究。

由于某些外部冲击等因素会导致进口商品价格相对国内商品价格降低,一方面在短期可能会导致进口商品消费增加,从而会减少国内商品消费,另一方面,从长期来看, 进口商品消费的增加是否有可能带动国内消费的增长? 进口商品消费和国内商品消费是替代关系还是互补关系。

国外学者在这方面的研究起步较早,早期的研究都是基于理性消费理论来进行的。

Ceglowski (1991)利用美国进出口商品消费数据,在进口消费品模型的基础上运用动态最优方法获取的动态方程, 估算出美国进口需求的跨期替代弹性为0.8, Clarida (1994 )通过数据得出进口商品消费、国内商品消费和相对价格之间存在协整关系, 估算出美国进口商品消费需求的平均马歇尔价格弹性为- 0.95, 平均支出弹性为2.15, 而且随着进口商品消费占总支出比重的增加, 马歇尔价格弹性将收敛于-1。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Applied Econometrics with R: Package Vignette and ErrataChristian Kleiber Universit¨a t BaselAchim ZeileisWirtschaftsuniversit¨a t Wien Abstract“Applied Econometrics with R”(Kleiber and Zeileis2008,Springer-Verlag,ISBN˜978-0-387-77316-2,pp.˜vii+222)is thefirst book on applied econometrics using the R˜systemfor statistical computing and graphics(R Development Core Team2008).It presentshands-on examples for a wide range of econometric models,from classical linear regressionmodels for cross-section,time series or panel data and the common non-linear models ofmicroeconometrics,such as logit,probit,tobit models as well as regression models forcount data,to recent semiparametric extensions.In addition,it provides a chapter onprogramming,including simulations,optimization and an introduction to R tools enablingreproducible econometric research.The methods are presented by illustrating,amongother things,thefitting of wage equations,growth regressions,dynamic regressions andtime series models as well as various models of microeconometrics.The book is accompanied by the R package AER(Kleiber and Zeileis2009)which contains some new R functionality,some100data sets taken from a wide variety ofsources,the full source code for all examples used in the book,as well as further workedexamples,e.g.,from popular textbooks.This vignette provides an overview of the package contents and contains a list of errata for the book.Keywords:˜econometrics,statistical software,R.1.Package overview1.1.R code from the bookThe full R code from the book is provided in the demos for the package AER.The source scripts can be found in the demo directory of the package and executed interactively by calling demo(),as inR>demo("Ch-Intro",package="AER")One demo per chapter is provided:Ch-Intro(Chapter˜1:Introduction),Ch-Basics(Chapter˜2:Basics),2AER:Package Vignette and ErrataCh-LinearRegression(Chapter˜3:Linear Regression),Ch-Validation(Chapter˜4:Diagnostics and Alternative Methods of Regression), Ch-Microeconometrics(Chapter˜5:Models of Microeconometrics),Ch-TimeSeries(Chapter˜6:Time Series),Ch-Programming(Chapter˜7:Programming Your Own Analysis).This list of demos is also shown by demo(package="AER").The same scripts are contained in the tests directory of the package so that they are auto-matically checked and compared with the desired output provided in.Rout.savefiles.To make the code fully reproducible and to avoid some lengthy computations in the daily checks,a few selected code chunks are commented out in the scripts.Also,for technical reasons,some graphics code chunks are repeated,once commented out and once without comments.1.2.Data setsThe AER package includes some100data sets from leading applied econometrics journals and popular econometrics textbooks.Many data sets have been obtained from the data archives of the Journal of Applied Econometrics and the Journal of Business&Economic Statistics.Some of these are used in recent textbooks,among them Baltagi(2002),Davidson and MacKinnon(2004),Greene(2003),Stock and Watson(2007),and Verbeek(2004).In addition,we provide all further data sets from Baltagi(2002),Franses(1998),Greene(2003), and Stock and Watson(2007).Detailed information about the source of each data set,descriptions of the variables included, and usually also examples for typical analyses are provided on the respective manual pages.A full list of all data sets in AER can be obtained viaR>data(package="AER")In addition,manual pages corresponding to selected textbooks are available.They list all data sets from the respective book and provide extensive code for replicating many of the empirical examples.See,for example,R>help("Greene2003",package="AER")for data sets and code for Greene(2003).Currently available manual pages are: Baltagi2002for Baltagi(2002),CameronTrivedi1998for Cameron and Trivedi(1998),Franses1998for Franses(1998),Greene2003for Greene(2003),StockWatson2007for Stock and Watson(2007).Christian Kleiber,Achim Zeileis31.3.New R functionsAER provides a few new R functions extending or complementing methods previously available in R:tobit()is a convenience interface to survreg()from package survival forfitting tobit regressions to censored data.In addition to thefitting function itself,the usual set of accessor and extractor functions is provided,e.g.,print(),summary(),logLik(),etc.For more details see?tobit.ivreg()fits instrumental-variable regressions via two-stage least squares.It providesa formula interface and calls the workhorse function ivreg.fit()which in turn callslm.fit()twice.In addition to thefitting functions,the usual set of accessor and extractor functions is provided,e.g.,print(),summary(),anova(),etc.For more details see?ivreg,?ivreg.fit,and?summary.ivreg,respectively.dispersiontest()tests the null hypothesis of equidispersion in Poisson regressions against the alternative of overdispersion and/or underdispersion.For more details see ?dispersiontest.2.ErrataThe following errors have been found in the book so far.Please report any further errors youfind to us.p.˜85–86:Due to a bug in the summary()method for“plm”objects,the degrees of freedom reported for the F˜statistics were interchanged and thus the p˜values were not correct.Therefore,the p˜values printed in the book at the end of summary(gr_fe)and summary(gr_re)are not correct,they should both be<ing plm1.1-1or higher,the code produces the correct output.p.˜92:Exercise˜6cannot be solved using PSID1982since that data set only containsa cross-section while Hausman-Taylor requires panel data.A panel version has beenavailable in the plm package under the name Wages;we have now added PSID7682 to AER for completeness(and consistent naming conventions).Use PSID7682for the exercise.p.˜169:The comment regarding the output from the Johansen test is in error.The null hypothesis of no cointegration is not rejected at the10%level.Nonetheless,the table corresponding to Case˜2in Juselius(2006,p.420)reveals that the trace statistic is significant at the15%level,thus the Johansen test weakly confirms the initial two-step approach.p.˜179:For consistency,the GARCH code should be preceded by data("MarkPound").p.˜205:The reference for Henningsen(2008)should be:Henningsen A(2008).“Demand Analysis with the Almost Ideal Demand Sys-tem in R:Package micEcon,”Unpublished.URL˜http://CRAN.R-project.org/package=micEcon.4AER:Package Vignette and ErrataNote:Currently,all links on manual pages corresponding to data sets taken from the Jour-nal of Business&Economic Statistics(JBES)archive are broken(data sets MarkPound,and RecreationDemand).The reason is the redesign of the American Statistical Association(ASA) website,rendering the old ASA data archive nonfunctional.The ASA journals manager cur-rently appears to supply data on a case-by-case basis.The problem awaits a more permanent solution.ReferencesBaltagi BH(2002).Econometrics.3rd edition.Springer-Verlag,New York.URL http:// /sgw/cda/frontpage/0,10735,4-165-2-107420-0,00.html.Cameron AC,Trivedi PK(1998).Regression Analysis of Count Data.Cambridge University Press,Cambridge.Davidson R,MacKinnon JG(2004).Econometric Theory and Methods.Oxford University Press,Oxford.Franses PH(1998).Time Series Models for Business and Economic Forecasting.Cambridge University Press,Cambridge.URL http://www.few.eur.nl/few/people/franses/ research/book2.htm.Greene WH(2003).Econometric Analysis.5th edition.Prentice Hall,Upper Saddle River, NJ.URL /~wgreene/Text/econometricanalysis.htm. Juselius K(2006).The Cointegrated VAR Model.Oxford University Press,Oxford.Kleiber C,Zeileis A(2008).Applied Econometrics with R.Springer-Verlag,New York.ISBN 978-0-387-77316-2.Kleiber C,Zeileis A(2009).AER:Applied Econometrics with R.R˜package version˜1.1-1, URL /package=AER.R Development Core Team(2008).R:A Language and Environment for Statistical Computing. R Foundation for Statistical Computing,Vienna,Austria.ISBN3-900051-07-0,URL http: ///.Stock JH,Watson MW(2007).Introduction to Econometrics.2nd edition.Addison-Wesley, Reading,MA.Verbeek M(2004).A Guide to Modern Econometrics.2nd edition.John Wiley&Sons, Hoboken,NJ.Christian Kleiber,Achim Zeileis5Affiliation:Christian KleiberWirtschaftswissenschaftliches Zentrum(WWZ)Universit¨a t BaselPeter Merian-Weg6CH-4002Basel,SwitzerlandE-mail:Christian.Kleiber@unibas.chURL:http://www.wwz.unibas.ch/kleiber/Achim ZeileisDepartment of Statistics and MathematicsWirtschaftsuniversit¨a t WienAugasse2–6AT-1090Wien,AustriaE-mail:Achim.Zeileis@URL:http://statmath.wu-wien.ac.at/~zeileis/。

相关文档
最新文档