Zehra Gabillon
email: zehra.gabillon@upf.pf

Rodica Ailincai
email: rodica.ailincai@upf.pf

Using Video Recorded Corpus to Analyze Classroom Interactions in Elementary School EFL Classes

Keywords: interaction analysis, coding, qualitative research, EFL classroom, young learners, CAQDAS, interactionist perspective, SLA, socio-cultural theory, competency-based approaches, action-oriented approach, communicative language teaching

This paper describes an interaction analysis study, which was carried out in a French Polynesian elementary school context. The corpus for the study was gathered via video recordings during an extensive educational project. This project aimed at collecting corpora on various school subjects from French Polynesian elementary schools between the years 2014-2017. The researchers used ATLAS.ti, a Computer Assisted Qualitative Data Analysis Software (CAQDAS) to analyse the classroom interactions collected from six elementary school teachers' EFL classes. The study attempted: a) to discover common teaching strategies and techniques the teachers employed; b) to understand the effects the teachers' actions on the learners, and c) to determine whether the teachers' teaching methodologies were in concordance with today's foreign language teaching approaches. The study used both comprehensive and descriptive data analysis methods. The transcribed data were examined by focusing on both verbal and nonverbal classroom interventions. The codes were generated by studying both classroom exchanges and video recordings. The analysed data were presented using interpretations of individual instances, examples, paradigms, and frequencies.

INTRODUCTION

The present research took place in a French Polynesian elementary school context and reports on a classroombased interaction analysis study aimed at exploring teacher and learner exchanges. This research work uses a video-recorded corpus gathered via an extensive research project called 'Pratiques Educatives Enseignantes et Parentales en Polynésie' (PrEEPP-Teachers and Parents' Educational Practices in Polynesia) which was funded by the following organizations: Ministère des Outre-Mer (Ministry of Overseas France), Université de la Polynésie Française (The University of French Polynesia), Vice-rectorat de la Polynésie française, and the ESPE de l'Académie de Guadeloupe. The project was launched in 2014 and was carried out by a multidisciplinary and multi-institutional research team. The primary objective of this longitudinal research initiative was to constitute a representative body of an educational corpus from French Polynesian elementary school classrooms. To be precise, the initiative comprised of gathering large-scale data samples of different school subjects (i.e. Science, Mathematics, English, and Tahitian) across five French Polynesian archipelagos (Society Islands, Tuamotu Archipelago, Marquesas Islands, Gambier Islands, and Austral Islands). The geographical area that the project covered was as large as Europe and required the researchers to travel long distances (i.e. by boat and plane) to collect data. In 2015, some researchers from the University of French Polynesia integrated another local project into PrEEPP. The project was named after the state elementary school Maeha'a Nui, where the project was carried out. The primary objective of this scheme was to create a multilingual space within the school's premises. This project contained both research and non-research activities. The classroom corpus obtained via the Maeha'a Nui initiative was also integrated into the corpora of PrEEPP. The data collection procedures of PrEEPP initiative were completed in July 2017; however, the transcribing and analysing processes are still in progress. The researchers who participated in the study have started sharing the initial research results through conference communications and academic publications (e.g. see [START_REF] Ailincai | School and Family Involvement in Educational Practices in French Polynesia[END_REF][START_REF] Ailincai | Pratiques éducatives scolaires et familiales en Polynésie française[END_REF][START_REF] Gabillon | Maeha'a Nui: A Multilingual Primary School Project in French Polynesia[END_REF]Gabillon, & Rodica, 2015a[START_REF] Gabillon | Content and Language Integrated Learning: In search of a coherent conceptual framework[END_REF][START_REF] Devos | Introduction[END_REF]Gabillon, 2016).

The study described in this paper utilised six samples of video-recorded data gathered during the PrEEPP project. The researchers examined the classroom exchanges collected from six English as a foreign language (henceforth EFL) lessons. These samples were collected from different French Polynesian archipelagos. The study aimed to explore the teaching strategies and techniques the teachers employed in their EFL classes.

The present study based its theoretical stance on the sociocultural and interactionist perspectives in foreign language learning (henceforth L2). Sociocultural and interactionist theories see foreign language learning as happening through dialogic exchanges. These two viewpoints underline the importance of interaction in foreign language learning. From these perspectives, language learning takes place in interaction (in the process of interacting) rather than as a result of it. This classroom corpus-based interaction analysis study utilised both qualitative and descriptive data analysis methods. The researchers used ATLAS.ti, a Computer Assisted Qualitative Data Analysis Software (CAQDAS) to analyse the corpus, and the results were presented by using extracts, comments and histograms.

LITERATURE REVIEW AND THEORETICAL STANCE

SLA is a multi-disciplinary field which makes use of insights and research paradigms from other domains such as linguistics, education, sociology, psycholinguistics, sociolinguistics and psychology [START_REF] Ellis | Analysing learner language[END_REF]. It is commonly stated that the issues concerning L2 learning cannot be fully understood from a single perspective [START_REF] Tarone | Still wrestling with 'context'in interlanguage theory[END_REF]. L2 learning involves a multitude of complex and interacting incidents which cannot be captured and understood from a narrow viewpoint. This study views L2 learning as a situated phenomenon which is influenced by both micro and macro social contexts and "…embedded in these contexts are the multiple relations of inequitable power in which language learners participate." (Ellis & Barkhuizen, p. 278, 2005). This research work based its standpoints on sociocultural (SC) (Vygotsky, 1978[START_REF] Lantolf | Sociocultural theory and second language learning: Introduction to the special issue[END_REF], 2006, 2009) and interactionist perspectives [START_REF] Swain | The output hypothesis and beyond: mediating acquisition through collaborative dialogue[END_REF]. These two viewpoints seem to capture the complexity of foreign language learning (henceforth L2) both in instructional and natural settings. From these viewpoints, language learning is regarded as occurring in interaction (in the process of interacting) rather than as a result of it [START_REF] Lantolf | Sociocultural theory and second language acquisition[END_REF]. Although Vygotsky's works stressed the role of socially mediated interaction in learning, his standpoints were different from today's interactionist perspectives in language learning. The sociocultural and interactionist traditions used different research paradigms and produced different scientific terminology. However, these two approaches share remarkable similarities, as regards the principles which characterize them. In SLA literature, these two standpoints are often referred to under the name of 'socio-interactionist approach' (e.g. [START_REF] Mondada | Second language acquisition as situated practice: Task accomplishment in the French second language classroom[END_REF][START_REF] Swain | The output hypothesis and beyond: mediating acquisition through collaborative dialogue[END_REF][START_REF] Van Compernolle | Incidental microgenetic development in second-language teacher-learner talkin-interaction[END_REF]. These two perspectives are complementarity to one another, and they underline the importance of scaffolding (teacher & peer) and face-to-face interaction in L2 learning (Vygotsky, 1978;[START_REF] Lantolf | Sociocultural theory and second language learning: Introduction to the special issue[END_REF][START_REF] Lantolf | Sociocultural theory and L2: State of the art[END_REF][START_REF] Lantolf | Sociocultural theory and second language acquisition[END_REF][START_REF] Swain | The output hypothesis and beyond: mediating acquisition through collaborative dialogue[END_REF]. They both view L2 learning as a social phenomenon occurring with the involvement of diverse social actors and artefacts [START_REF] Lantolf | Second language learning as a mediated process[END_REF]. In this literature section, the researchers will try to highlight the key terminology used in these two perspectives.

For the last two decades, there has been an exponential increase in the interest in SC theories in L2 learning. This theory suggests that human learning is primarily a social process. Foreign language specialists who adopt an SC framework consider language learning as a social activity in which language operates as a tool for thought [START_REF] Lantolf | Sociocultural theory and second language acquisition[END_REF][START_REF] Lantolf | Sociocultural theory and L2: State of the art[END_REF][START_REF] Mitchell | Second language learning theories[END_REF]. L2 learning from this viewpoint is seen as an activity which happens both in social (interpersonal-social & cognitive) and personal planes (intrapersonal-individual & cognitive) (Vygotsky, 1978). The sociocultural perspective sees cognitive development and knowledge construction as a collaborative social event, which uses social artefacts. According to this view, optimal cognitive development depends upon socially mediated interaction. From this perspective, language learning is seen as a situated activity that occurs first in a social context through interaction with others and then within the individual through cognitive processes [START_REF] Lantolf | Second language learning as a mediated process[END_REF][START_REF] Lantolf | Sociocultural theory and second language acquisition[END_REF][START_REF] Lantolf | Sociocultural theory and L2: State of the art[END_REF][START_REF] Mondada | Second language acquisition as situated practice: Task accomplishment in the French second language classroom[END_REF][START_REF] Swain | The output hypothesis and beyond: mediating acquisition through collaborative dialogue[END_REF].

The key terms which are associated to SC philosophies are: 'mediation', 'Zone of Proximal Development (ZPD)', 'scaffolding', 'Activity', and 'Social Artefacts'. The term mediation was introduced to literature by Vygotsky (1978) and refers to interpersonal interactions that provide guidance (help) in children's cognitive development and knowledge construction. The ZPD concept is linked with mediation, and it constitutes the central element of the SC theory. ZPD explains how learning takes place in a social context. It refers to the difference between what a learner is capable of doing without guidance and what s/he is capable of doing with guidance (Vygotsky, 1978). The concept has been interpreted and applied to various educational contexts (see Figure 1, Gabillon & Ailincai, 2006). According to the SC perspective, knowledge is co-constructed with others (other-regulated) in social planes, and it is appropriated (self-regulated, internalized) in personal-planes. In this social setting, language is used as a means by the individual to regulate his/her cognitive activities, that is, language is used as a "…tool for thought…" and "…a tool for learning…" [START_REF] Lantolf | Sociocultural theory and second language acquisition[END_REF][START_REF] Lantolf | Sociocultural theory and L2: State of the art[END_REF][START_REF] Mitchell | Second language learning theories[END_REF]. The term scaffolding was introduced to the sociocultural literature through the works of Jerome Brunner and his colleagues (Brunner et al., 1976). Later the concept was elaborated by Bruner, and the concept now is associated with him (Brunner, 1978). This term was defined as the process of supportive dialogue, which draws the learners/peers' attention to the main features of learning (Brunner et al., 1976). According to Vygotsky (1978) the social activity, which involves the use of social artefacts, contributes to the child's cognitive development. The role of social artefacts in the child's potential cognitive development is explained by Vygotsky's ZPD concept (1979). The SC theory considers all human-made material and objects as artefacts. [START_REF] Swain | Sociocultural theory in second language education: An introduction through narratives[END_REF] claim that all artefacts, such as symbolic (e.g. language) and material (e.g. books) can become tools for mediation. [START_REF] Swain | Sociocultural theory in second language education: An introduction through narratives[END_REF] assert that all sort of human mental activity is mediated through individuals' interactions with these social artefacts (symbolic and material world) around them. The role of artefacts in mediating learning is explained and theorised in the activity theory. In SC theory, activity is described as a purposeful social interaction between actors and "artefacts" (the world and its objects). Aleksei Leontiev's Activity Theory expanded and updated many of the concepts introduced by Vygotsky [START_REF] Leontiev | The problem of activity in psychology[END_REF][START_REF] Leontiev | Activity, consciousness, and personality[END_REF][START_REF] Engeström | Learning by expanding an activity -theoretic approach to developmental research[END_REF]. (Gabillon & Ailincai, 2016).

The key terms used in the interactionist approach are: 'comprehensible input', 'interaction hypothesis', 'collaborative interaction/dialogue', 'negotiation of meaning', 'output', 'noticing' 'hypothesis testing' 'modified output', and 'intake'. Interactionist perspective to L2 learning takes its inspiration from Krashen's 'input hypothesis' [START_REF] Krashen | A Response to Mclaughlin, was monitor model: Some methodological considerations[END_REF][START_REF] Krashen | Second language acquisition theory and the preparation of teachers: Toward a rationale[END_REF] which explained that the primary condition for language learning is to understand messages (input). He named this phenomenon as 'comprehensible input'. In his input hypothesis, he maintained that in order for learners to progress, the level of the input should be 'i +1' ('i' represents the learner's language level, and +1 is the new input, which should be a little higher than the learners' actual level).

L2 Researcher Michael Long insisted that the interactions that take place in L2 learning contexts should not be seen as "…one-directional source of target language input…" (Mitchell & Myles, p. 160, 2004). Long took Krashen's ideas further by proposing that attention should be paid to the interactions which occur between learners and proposed the 'interaction hypothesis' [START_REF] Long | Input, interaction, and second-language acquisition[END_REF][START_REF] Long | Native speaker/non-native speaker conversation and the negotiation of comprehensible input1[END_REF]). Long's interaction hypothesis (1981Long's interaction hypothesis ( , 1983) ) claimed that "…L2 acquisition is facilitated when a communication problem arises that causes learners to try to resolve it …." (Ellis, 2012, p. 23). This process of modification and restructuring during interactions happening between peers is named as 'negotiation of meaning' [START_REF] Long | Input, interaction, and second-language acquisition[END_REF][START_REF] Long | Native speaker/non-native speaker conversation and the negotiation of comprehensible input1[END_REF]. Swain referred to this process as 'collaborative dialogue'. According to her, collaborative dialogue "…is knowledge-building dialogue…" (Swain, 2000, p. 97) and modifications that are made within these collaborative interactions resolve communication difficulties [START_REF] Ellis | The Interaction Hypothesis: A Critical Evaluation[END_REF]. Ellis and Barkhuizen defined the negotiation of meaning as "… the conversational exchanges that arise when interlocutors seek to prevent a communicative impasse occurring or to remedy an actual impasse that has arisen…" (Ellis & Barkhuizen, 2005, pp.166-167). Swain maintained that negotiation of meaning process aims to increase the comprehensibility of the interaction and meaning-making [START_REF] Swain | The output hypothesis: Just speaking and writing aren't enough[END_REF][START_REF] Swain | The output hypothesis and beyond: mediating acquisition through collaborative dialogue[END_REF]. She explained that during the negotiation process the learners use strategies such as repeating, rephrasing, and translating etc. that lead to the comprehension of the input. Nonetheless, she claimed that comprehension is not the sufficient condition for L2 learning and argued that there is a direct link between language use and language learning [START_REF] Mitchell | Second language learning theories[END_REF]. Swain maintained that interaction provides not only comprehensible input but also the opportunity to use the language (output). She put forward a set of claims explaining that "…output pushes learners to process language more deeply…" (Swain, 2000, p.99). She also maintained that 'output' should be seen both as part of a communicative and cognitive activity. She formulated this claim as 'output hypothesis' [START_REF] Swain | Communicative competence: Some roles of comprehensible input and comprehensible output in its development[END_REF][START_REF] Swain | The output hypothesis: Just speaking and writing aren't enough[END_REF][START_REF] Swain | Problems in output and the cognitive processes they generate: A step towards second language learning[END_REF]. Swain maintained that 'output' requires more cognitive effort than 'input' and it pushes the learners to progress. She added that during the output learners may notice the gap between their interlanguage and the target language and may look for help to fill in this gap (help from peers or teachers-ZPD). This viewpoint sustains that learners apply a series of 'hypothesis testing' procedures to test the accuracy of their interlanguage. This process helps them progress in their learning through the use of trial-error strategies and modify their input (intake). Having gone through this activity learners become aware of their problems, predict their needs, set goals, monitor their language performance, and to evaluate their success [START_REF] Swain | Sociocultural theory in second language education: An introduction through narratives[END_REF], 2015).

The principles of the aforementioned theories constitute the foundation of the recent L2 teaching approaches. These L2 approaches are grouped under the competency-based language teaching (CBLT). The commonly known L2 teaching methodologies which fall into this category are: a) Action-based/oriented approach (AOA), b) Communicative Language Teaching (CBLT), c) Task-based language teaching (TBLT), d) Project-based approach, e) Content and Language Integrated Learning (CLIL) (Adler & Milne, 1997;[START_REF] Lier | Action-based teaching, autonomy and identity[END_REF]Council of Europe, 2001, Richards & Rodgers, 2014). These L2 approaches respond to the key expectations defined in the Common European Framework of reference for languages, other relevant Council of Europe publications (Council of Europe, 2001;European Commission, 1995[START_REF] Ellis | The roles the learners had in the classroom were predominantly passive. • There were very limited real-life exchanges and group-work activities[END_REF], 2008;[START_REF] Network | Content and language integrated learning (CLIL) at school in Europe[END_REF] and in the official texts published by the French Ministry of education. As the name indicates, these competency-based approaches aim to build skills and competencies that learners can transfer and use in other similar contexts. They all emphasize the primacy of face-to-face interaction in language learning and activities which focus on the successful functioning in society (i.e. to be able to use the language communicatively in real-life situations etc.).

This research study will also use the principles conveyed through the activity framework designed by Gabillon andAilincai (2015b, 2016). The framework was designed through applying the ideas expressed in the sociocultural and interactionist perspectives. The aim of this framework was to provide teachers with some guidance in the conception of their L2 activities. [START_REF] Gabillon | Content and Language Integrated Learning: In search of a coherent conceptual framework[END_REF][START_REF] Devos | Introduction[END_REF]. The principles of this framework are presented in Table 1.

Table 1: Socially-mediated activity design for L2 learning [START_REF] Gabillon | Content and Language Integrated Learning: In search of a coherent conceptual framework[END_REF] Socially Mediated Activity (SMA) Framework Collective mediation

• SMA views learning as an active and constructive process where learners collectively construct new information through collaborative interaction and joint attention Joint attention

• SMA uses goal-directed activities which require learners to work together to fulfil tasks Collaborative interaction

• SMA encourages natural face-to-face pair/group interactions. This type of collaborative interaction uses language as a means to exchange information and construct knowledge

Social artefacts & gestures

• SMA enables the use of artefacts and gestures to mediate learning Experiential learning

• SMA provides learners with hands-on activities to enable learning through direct experience (e.g. laboratory experience, gardening etc.)

Naturalistic learning environment

• SMA allows learning to take place in naturalistic learning settings (e.g. laboratory experiments in labs, gardening in the garden etc.) Active involvement

• SMA uses activities which necessitate each individual learner's active participation to complete tasks

CONTEXT

French Polynesia is an 'Overseas Territory' of France (COM--collectivités d'outre-mer) and the primary and secondary education implement the French National Curriculum. French Polynesia is a multilingual society where several local languages are used as home languages. Nevertheless, French is the only official language and the medium of school instruction. There are a hundred and seventy-two elementary schools scattered over five archipelagos, and because of their remoteness, these schools are not easy to coordinate (Gabillon & Ailincai, 2015a). In French Polynesia, elementary school teachers are generalist teachers, and they do not receive specialised primary level foreign language teacher education as part of their qualification (Gabillon & Ailincai, 2015a).

Between the years 2005-2017, several educational research projects were funded by both the French government and local authorities. These projects addressed issues concerning plurilingualism and school instruction and investigated the influence of bilingualism (French and the Tahitian language) on Polynesian children's school learning. These research activities concerning the importance of plurilingualism have provided the local educational authorities with useful information on Polynesian children's academic, cognitive, social and conational skills in a multilingual elementary school setting (Gabillon & Ailincai, 2015a).

During the PrEEPP project (2014-2017), more than 80 video-recorded data were obtained (from different subject lessons and parent interviews). From the EFL classes, all in all, 16 video-recorded lessons were collected. These recordings were gathered from the following archipelagos: Society Islands (6 lessons), Tuamotu Archipelago (3 EFL lessons), Marquesas Islands (3 lessons), Gambier islands (1 EFL lesson), and Austral islands (3 lessons).

The corpora gathered during the PrEEPP initiative were vast, and the researchers have not yet completed transcribing and analysing processes.

RESEARCH METHODOLOGY

This research work is an interaction analysis study which used both comprehensive and descriptive statistics as analysis methods. The videotaped classroom corpus was transcribed, and the transcribed data were analysed by using a qualitative data analysis software ATLAS.ti. The results obtained were presented by using qualitative methods (e.g. extracts, comments etc.) and descriptive statistics (e.g. histograms).

The study aimed to: a) to discover common teaching strategies and techniques the teachers employed; b) to understand the influence of the teachers' actions on their learners, and c) to determine whether the teachers' teaching methodologies were in concordance with today's foreign language teaching approaches.

Participants & Data Collection

The present study focuses on EFL learning in this plurilingual French Polynesian context. The subjects involved in this study were four female and two male elementary school teachers with ages ranging from 32 to 45. These teachers had between 8 to 20 years of teaching experience. The video-recorded data contained 121 elementary school students' classroom corpora. The number of students in each class varied from 21 to 27 students. All of the participants were elementary school students between 7 to 11years of age and 1 to 3 years of English language learning experience.

Data Collection Method

L2 classes involve a variety of actions, and face-to-face exchanges and such incidents could not be easily captured and understood. Classroom-based research requires capturing linguistic, extra-linguistic and social aspects of classroom discourse [START_REF] Dufon | Video recording in ethnographic SLA research: Some issues of validity in data collection[END_REF][START_REF] Swann | Recording and transcribing talk in educational settings[END_REF]. This research work used video recording as a research instrument. When used as a research instrument video-recording provides researchers with a replicate of actual classroom happenings. Some of the advantages of video-recordings can be listed as follows: A) They capture both linguistic and social cues such as the language, turn taking, voice, intonation, and extra-linguistic elements such as gestures, body language and so forth. B) They provide permanent data which could repeatedly be replayed and studied. C) They help to distinguish different speakers. D) They provide visual information which contributes to clarifying verbal messages. E) They may help to identify observable emotions such as enjoyment, boredom, excitement, anger and so forth. F) They provide contextual information concerning the physical setting such as space, facilities, classroom arrangements, teacher movements, posture and so forth. G) They provide researchers with the complete account of the classroom exchanges (i.e. every word uttered and every action made is recorded).

Analysis Method

This study used interaction analysis method to analyse the video-recorded corpus. Interaction analysis is a widely-used method in SLA and Applied Linguistics research. This research paradigm enables researchers to capture and analyse a multitude of elements occurring during human interactions (both verbal and non-verbal).

The analysis procedures entailed transcribing, coding, linking, comparing, grouping and interpreting.

In this study, the following procedures were followed. First, the videotaped corpus was transcribed paying attention to both verbal and non-verbal elements in the corpus samples. The transcriptions were made manually using a transcription notation adapted from the notation system offered by [START_REF] Jefferson | Glossary of transcript symbols with an introduction[END_REF] (See Table 2). The transcriptions were then imported to ATLAS.ti software for analysis. The initial coding was performed through the use of open codes. The researchers studied each transcription closely and labelled the exchanges according to the functions they performed in the exchange. Then they labelled the codes mostly using the terms from SLA and Applied Linguistics literature. After the identification and labelling of the concepts, related ideas were linked and grouped. The researchers continued studying, linking and comparing processes until they formed consistent concept groups. Finally, the labelled concepts were reintegrated into higher level categories. (hhh) Parentheses Indicates laughter in the conversation/speech.

--Dash Indicates a break within a word.

= Equal Sign

Indicates the break and subsequent continuation of a single interrupted utterance.

The insights gained through inductive analysis and comparisons were presented in the form of comments. The SLA and FLL research studies were also contributed to the shaping of the interpretations and comments. The researchers utilized extracts of significant episodes to illustrate vivid examples to support explanations. In addition to qualitative comments and inductive interpretations, a summary of results was presented using frequencies (e.g. histograms).

RESULTS

This section will present the results obtained through comprehensive and inductive analysis procedures. These results concerning the categories and the summary of results will be presented using of comments, tables, histograms, and extracts.

Categories

After intensive comprehensive and inductive analysis processes (e.g. repeated viewing of the video-recorded material, coding, linking, comparing, grouping etc.), the researchers grouped all exchanges under two major categories as 'Teacher' and 'Learners'. Other higher-level categories were grouped under these two main groups. The summary of results used these groups to explain the outcome of this research.

The SLA and Applied Linguistic terms were used to name the meaning and function of the teachers' and learners' utterances. These higher-level categories were formed through applying the qualitative analysis processes used in grounded theory, that is, the concepts were labelled, and then the categories were developed when the researchers discovered concepts on the same phenomenon (not all concepts became groups). This means that when a concept was named it was compared with other concepts for similarities and differences.

Only the most grounded, pertinent, and thickest, categories became higher level groups.

The teachers' classroom exchanges were grouped into five higher-level categories according to their functions. These categories were named as T-Scaffolding strategies, T-Corrective feedback strategies, T-Problems related to L2 competence, T-Use of the Mother Tongue (hereafter L1), and T-Activity Types. Other lower level concepts which represented similar activities were assembled under these headings. Table 3 presents the categories and sub-categories grouped under the category 'Teacher' (see Table 3). Concerning the students, the categories that emerged through the analysis process indicated three large categories: L-Active Involvement, L-Passive Involvement and L-Use of L1 (see Table 4). Other sub-groups which are linked with these groups were also collected under these three higher level abstractions.

Summary of Results

1) The number of exchanges and duration of each lesson

In this study, the analysed classroom exchanges were mainly in the form of simple repetitions or short questionanswer type utterances. Only very few of the exchanges were learner initiated. This type of classroom exchange is known as Initiation Response Feedback (IRF).

The use of IRF patterns and whether they hinder or promote L2 development has been a subject of debate among SLA and FLL scholars. Many SLA researchers have argued that teachers adapt their classroom interactions according to the focus of the lesson. Some researchers maintained that IRF structure could be useful when the focus is on the 'accuracy'. However, many SLA studies have reported that the permanent use of such a teaching structure is unlikely to promote the communicative competence needed in real-life communications [START_REF] Ellis | Language teaching research and language pedagogy[END_REF]. These teaching patterns are easy to use and have control over the students because they proceed in an orderly manner and the teacher is the 'initiator' and 'knower'. This style of teaching restricts learner participation and does not allow trial-error possibilities. IRF is considered to be an unproductive instructional format that limits opportunities for L2 development when becomes a routine classroom procedure [START_REF] Ellis | Language teaching research and language pedagogy[END_REF][START_REF] Van Lier | Inside the Classroom: Learning Processes and Teaching Procedures[END_REF], 2008). IRF exchanges are not usual in communicative or task-based activities, which are primarily designed to promote face-to-face learner exchanges.

The transcribed corpus and video recordings illustrated that the language exchanges used in these six teachers' classrooms were short utterances through which the teachers initiated an exchange, asked a student to respond and then they followed up. Figure 2 presents the total number of exchanges occurred in each teacher's lesson and the duration of each lesson. Extract1 illustrates a series of repetition drill exchanges between Teacher1 (T1) and the students. Because of space constraints the researchers included only part of these ubiquitous whole-class exchanges. Extract 2 is also a good example to characterise an IRF exchange. In this particular example, T1 attempts to elicit the correct language form through the use of an IRF pattern. Although the teacher tries to involve other students in the corrective feedback procedures she fails to give a chance to the student to self-correct and she simply asks the student to repeat the correct language form (see Extracts 1 & 2). 2

) The Use of L1 & L2 language exposure

The issue of L1 use in foreign language classrooms has long been a subject of debate in the L2 literature. Many scholars (although many of them agreed on the legitimacy of L1 in L2 classrooms) claimed that successful language learning requires extensive L2 input. [START_REF] Chaudron | Second language classrooms: Research on teaching and learning[END_REF][START_REF] Ellis | Language teaching research and language pedagogy[END_REF][START_REF] Turnbull | There is a role for the L1 in second and foreign language teaching, but 1[END_REF]. [START_REF] Ellis | Language teaching research and language pedagogy[END_REF] explained that L2 learning is a slow and demanding process and unless learners receive L2 exposure, they cannot acquire it. [START_REF] Turnbull | Teachers' uses of the target and first languages in second and foreign language classrooms[END_REF], in their literature review about the L1 use, explained that that in some learning situations L1 use can help teachers and peers to scaffold learning and to negotiate meaning. They also maintained that during collaborative tasks the learners' use of L1 facilitates interpersonal interaction and increase their efficiency.

Figure 3 illustrates the frequencies of L1 utilised both by the teachers and the students. The analysis of the corpus from six participant teachers indicated that four out of six teachers sustained L2 use throughout their lessons except for some short exchanges to fix misunderstandings, to give instructions or explanations, or to make a joke and so forth. The analysis of the classroom exchanges showed that T1 and Teacher5 (T5) both used L1 extensively during their lessons. However, T1 used L1 more frequently than the other five teachers. In many occasions the teacher's use of L1 did not seem to be necessary and the exchanges L1 were particularly very lengthy (see Extracts 4 and 5). )) T : En français Yo-yo en anglais yo-yo. ((In French, it is yo-yo. In English, it is yo-yo)) ((The teacher writes the words on the board.)) T : En français puzzle en anglais puzzle ((In French, it is puzzle. In English, it is puzzle)) T : En français robot en anglais robot. ((In French, it is robot. In English, it is robot)) T : En français table en anglais table ! ((In French, it is table. In English, it is table)) ))] Ss (some): On va écrire un mail. ((We will write an email.)) T: Can you repeat (Canny)? Listen! T: Calyssa, repeat, please ? S: On va leur envoyer un mail. ((We will send them an email.)) T: On va leur envoyer un mail. ((We will send them an email.))

(T=Teacher, Ss=Learners S=Student)

T: So… Who is ready to write? Who is ready to write? ((She mimes meaning that they should write.)) T: Qui est prêt? Qui est prêt, déjà ? ((Some students raise their hands.)) Are you sure? T: Sûr? Sûr? [Unclear and overlapping speech.] S: Moi!° Moi!° [Me! Me!] T: Wait a minute…prêts ? (ready?) Can you…. Yes? Can you give me some example? ` Ss (some): Cochone ((Pig))? T: (hhh) aii aie non! T: So… Ss (some): On va regarder dans le dictionnaire! ((We will look it up in a dictionary.))

Regarding the students, the corpus indicated that in T5 and T6's classes the learners used L1 more than the students in other teachers' classes (except T5s class) (see Figure 3). In T6's lesson, the students were engaged in a group activity (the students were seven-year-old and most of the time the teacher was not present with the students). The close analysis of the learner interactions illustrated that these students were 'at task' 100% of the time and used L1 primarily to negotiate meaning, to give explanations to their classmates, to show disapproval, to imitate the teacher and so forth. All the activities they performed related to the task that they were involved in (see Extract 7). The students in T5's classroom, on the other hand, used L1 to show understanding, to ask for clarifications and so forth. However, they were not always 'at task' (see Extract 6).

Extract 7 (S=Student)

S4 : Sais pas comment on dit les grands nombres. ((Does not know how we say big numbers)) S6 : (Addresses S1 by calling out her name.) S1 : Sixteen? S6 : Yes, very good ((Imitates his teacher.)). ((We do not see the teacher but we hear her giggles.)) S2 : Elle a dit 'six'…((She said six…)) S6 : Teen::: ((He confirms that she (S1) said sixteen and not six.)) S2 : Teen? ((Asking for confirmation.)) S6 : (Nods his head in agreement.) Ss: … [Unclear overlapping speech] S6 : Tiens! ((Take!)) (Passes the box of flashcards to S1.)

3) Scaffolding strategies used by the teachers

The results obtained illustrated that the teachers used main teaching and scaffolding strategies which are commonly used by L2 teachers. The researchers grouped these strategies under the following labels: 'Asking for clarification', 'asking for confirmation', 'asking for repetition', 'giving explanation', 'asking for information' and use of artefacts'. 'Asking for clarification' refers to a strategy that teacher employs to help learners make their meaning clear. The teacher may also use this strategy to check learners' understanding. The primary function of this strategy is to make sure that the learners have understood the phenomenon in question. When used efficiently 'asking for clarification' strategy can promote active cognitive learner engagement and L2 development. The analysis indicated that this strategy was not very frequently used by the teachers except for T4 and T5 (see Figure 4). In this study 'asking for confirmation' refers to the teacher's request for confirmation to make sure that the learner means what s/he intends to say. However, in some cases this strategy may be used as a recast which is employed to direct the learner's attention to a mistake, and by asking for confirmation the teacher gives him/her the opportunity to correct himself/herself. These two functions are interrelated and sometimes it is difficult to separate one from the other. In this study, the researchers used the term 'asking for confirmation' to refer to both of these functions. The analysis revealed that this strategy was primarily used as a recast to indicate learners that they committed an error.

In L2 classrooms, functions of these teaching strategies may differ depending on the requirements of the situation and the intended purposes. For instance, 'asking for repetition' may take divers forms varying such as rote repetitions of words (see Extract 1 above), clarification requests to resolve misunderstandings, or asking for a repetition to hear well. In this research study the researchers defined 'asking for repetition' as a rote learning technique which is performed mechanically. The corpus illustrated that some teachers employed this strategy frequently (e.g. T1 and T3).

'Giving explanations' is the most commonly used and known teaching strategy. However, when it is used frequently and interminably this technique can lead to minimising useful Student Talking Time (STT). Some examples from T1 and T2's classrooms illustrated frequent and lengthy explanations, many of which could have been avoided through the use of examples, contextualising and the use of gestures or artefacts.

The category labelled as 'asking for information' means any form of request to obtain information or response from the students. This can be in the form of a simple question, elicitation, or brainstorming that necessitates a response from the learner. In the lessons the researchers examined, this strategy was predominantly used to get responses from the students. These, responses were predominantly in the form of short or one-word answers (T1 and T2).

The strategy 'use of gestures/artefacts' was exploited by all of the teachers observed. Mostly the teachers used this strategy to teach vocabulary items through the employment of flash-cards, PowerPoint slides, pictures, and objects. Many applied linguistic researchers, recommend a variety of comprehension based Total Physical Response activities [TPR-Demonstration based L2 teaching method first introduced to the Applied Linguistics literature by James [START_REF] Asher | The total physical response approach to second language learning[END_REF]] that encourage learner participation through the use of non-verbal response (through, demonstrating, drawing, acting, showing pictures etc.). Thus, supplementing verbal exchanges with non-verbal activities, through which the learners can participate, is highly recommended. The researchers did not observe other creative use of artefacts and objects. Activities such as real-life tasks, the use of TPR, artefacts and gestures to supplement instructions etc. were not observed in the analysed lessons.

The results also indicated that the learners were not encouraged to make use of artefacts and gestures to help them communicate, either. The learners were mainly encouraged to respond to the teacher verbally and nonverbal aspect of expression was very limited. Longitudinal SLA research studies have shown that young learners manifest a silent period at early stages of their L2 development [START_REF] Ellis | Language teaching research and language pedagogy[END_REF].

4) Corrective feedback strategies used by the teachers

Corrective feedback, that is, how teachers 'repair' their students' language errors, has been one of the most researched SLA topics [START_REF] Ellis | Corrective feedback and teacher development[END_REF]. Corrective feedback is an integral part of L2 learning and the methods teachers use to engage their students in this process influence the learners' L2 developments. How and how much error correction should be done, when errors should be corrected (immediately or delayed), by whom the correction should be done (teacher or students) have been the subjects of debates in SLA research (e.g. [START_REF] Ellis | Corrective feedback and teacher development[END_REF][START_REF] Lyster | Oral feedback in classroom SLA[END_REF]Russell, 2009 etc.). SLA research has maintained that repair (error-correction) can be used as a learning tool if it is not over done and when it is done efficiently. Recast (guided repair), that draws the learner's attention to a faulty language output, is viewed as an effective strategy to help learners notice the gap between their language production and the target language form. This strategy is known as an implicit error correction technique, through which the teacher encourages the learner to self-repair. The recast technique may also be used to encourage peer correction if the student cannot manage to self-repair. The direct correction technique, which was widely used in former L2 methodologies (Audio-lingual method-based on the behaviouristic approach) is no longer recommended by current L2 teaching pedagogies. During corrective feedback, it is also important that the purpose of the correction is understood by the learner (that the correction should not be misleading).

The results the researchers obtained through the analysis of the video-recordings and the transcriptions indicated that the participant teachers had the tendencies to use guided repair strategy (see Figure 5). However, on some occasions the teachers did not manage to make their purpose clear to their students. On some other occasions, the repair strategies the teachers employed were not clear because they were not sure about what exactly the error was or how to repair the error (which resulted in misleading corrections). These L2 competence related problems were grouped under the following headings: a) incorrect language use (e.g. mispronunciation, wrong word choice, wrong use of language structures etc.); b) leaving the problem unattended (not knowing how to correct an error or how to respond to a student's answer etc.); and c) inauthentic L2 use refers to the language use which does not comply with the authentic/natural native speaker use of the target language (e.g. such as translation of French expressions into English etc.).

Extract 9

(S= Student, T=Teacher) T : Ehhhm….The other… you please…will make an exercise, Okay? ((He uses the wrong verb 'make' with the word exercise)) Ss (some): Exercice?? ((Exercise?)) [Unclear and overlapping speech.] Inauthentic language use could be linked to language transfer or other cultural contextual influences. In general, these detected problems were minor and did not seem to be causing any harm to the learners' L2 development. However, the same types of mistakes were recurrently observed in almost all of the teachers' discourse. Thus, this problem, despite its trivial nature, reveals to be an issue to consider in elementary school teachers' initial teacher education (see Figure 6).

6) Learner Involvement

Issues concerning learner engagement in L2 classrooms have been the central topic in diverse SLA debates and research activities. Research in this area has focused both on the issues concerning learner participation, Teacher Talking Time (TTT), Student Talking Time (STT), teacher and learner interaction types, learner and cognition, learner initiation, classroom task types and so forth (Ellis,2012;[START_REF] Lier | Action-based teaching, autonomy and identity[END_REF][START_REF] Long | Input, interaction, and second-language acquisition[END_REF][START_REF] Long | Native speaker/non-native speaker conversation and the negotiation of comprehensible input1[END_REF][START_REF] Swain | Integrating language and content teaching through collaborative tasks[END_REF][START_REF] Van Lier | Agency in the classroom. Sociocultural theory and the teaching of second languages[END_REF]. The common point of these studies was learners' active engagement in their own L2 learning. It is now a common belief that active learner engagement is the key to L2 learning. However, it should be noted that learner participation using IRF structure, using mechanical repetition drills should not be considered as active learner engagement. Other, oral teacher-learner productions, which are the results of short question-answer type interactions, should not be mistaken for active learner participation. The results obtained from these six elementary school teachers' lessons indicated that these teachers (except T6) involved their learners in IRF type interactions based on short oral teacher-learner exchanges or mechanical repetition drills (see Figure 7). The results from the interaction and video-recorded material analysis illustrated that the students in T6's class were more actively engaged in their learning than the students in other teachers' classrooms. In this classroom, the students had the opportunities to collaborate with each other and engage in negotiation of meaning (i.e. asking for confirmation, clarification, giving explanations, disagreeing, giving feedback). The students were arranged in a group of seven students and the task given to them afforded the learners the opportunities to be actively engaged in L2 learning. Extract 10 represents a good example for negotiation of meaning taking place between three students in T6 class. These students were seven years old and had only a year of L2 learning experience. Their task was to take cards from a box, read maths operations to their classmates and ask their classmates to give the answer.

Extract 10 (S= Student) S7: ((Takes a flashcard from the box)) Fifty-one minus nine. S6 : Is… S7 : Je sais! ((I know!)) (( She raises her hand, turns her head and looks for the teacher.)) S7 : Sixty… S6 : Mais non! Moins! On a dit moins…((No, we said 'minus'.)) S6 : On a pas dit "plus"! ((We did not say 'plus'.)) S6 : Fifty…Fifty-two! Fifty-two! S4 : Quarante! Quarante! ((Forty ! Forty !)) S7 : Forty-two! S6 : Non, FORTY-TWO! Forty-two! S7 : J'ai dit avant toi.((I said it before you.) A number of studies have reported that small group activities help learners produce not only greater amount of language and but also better-quality language compared to activities in traditional teacher-oriented classroom settings [START_REF] Ellis | The roles the learners had in the classroom were predominantly passive. • There were very limited real-life exchanges and group-work activities[END_REF][START_REF] Ellis | Language teaching research and language pedagogy[END_REF][START_REF] Lier | Action-based teaching, autonomy and identity[END_REF][START_REF] Long | Input, interaction, and second-language acquisition[END_REF][START_REF] Long | Native speaker/non-native speaker conversation and the negotiation of comprehensible input1[END_REF]. Group work also provides learners with the opportunities to negotiate for meaning when a communication problem arises. These studies maintained that group work can offer interactional conditions that facilitate L2 learning compared to L2 situations involving only teacher-student exchanges.

Figure 9 displays that the five teachers out of six favoured non-communicative activities (i.e. mechanical activities) over activities based on real-life needs. The results also suggest that these teachers (except T6,) spent more time performing whole-class IRF than group activities that promote interaction and language production (output).

Figure 1 .

 1 Figure 1. A Schematic representation of the notion of Zone of Proximal Development (ZPD) in an educational context(Gabillon & Ailincai, 2016).

Figure 2 :

 2 Figure 2: The number of exchanges and duration per lesson (T=Teacher)

  ball is in? ((She uses a gesture to indicate the position 'in')) Ss: On! T: The ball is on! Stevens? Repeat! S1: The ball is on the table! T: Is good: ::::! T: ((The teacher shows another picture.)) …

Figure 3 :

 3 Figure 3: The use of L1 (teacher & learners) and the teacher's encouragement to use L2 (T=Teacher, E=Exchanges)

  ((bag)), the bag. Tout le monde est d'accord ? ((Does everyone agree?)) ((The teacher writes the words in French and in English.)) Ss: Oui! ((Yes !)) T : Tout le monde répète ((Eveybody repeats)) : bag ! Ss: Bag! T : Autre chose peut-être! ((Perhaps another thing!)) T : Kahea? ((The teacher points to Kahea)) S9 : °°° (Unclear speech) T: Plus fort ma puce. ((Louder my heart)) S9: Table… T : Table! Est ce que c'est bon? (('Table' ! Is it correct?)) Ss: Oui! ((Yes!)) ((Some students keep their hands up. They are waiting for the The teacher to ask them to speak.)) T: Répétez ! table! ((Repeat ! 'table')) Ss : Table! (T=Teacher, Ss=Learners S=Student) T: Bien! Poupée ((Well! Doll)), a doll! A vous! ((You!)) Ss: A doll! T : On passera à la prononciation ensuite. ((We will then proceed to pronunciation.)) T : Alors ! Yo ::-::yo? Alors ça pourrait être quoi ? Je ne fais pas le niveau difficile normalement le matin. ((Well! Yo::-:Yo ! What could it be? Normally, I do not do the difficult level in the morning.)) ……….. T : Allez ! On fait un petit rappel, ce ne seront pas long, on va voir si vous vous en rappelez. ((Come on, we (will) do a little revision, it will not be long, we'll see if you remember.)) T : C'était une des premières séances de l'année. ((It was one of the first sessions of the year.

  of L1 Teacher's use of L1 T1's lesson was based on translating language items from English to French or vice versa. However, T5 used L1 to give complex instructions, to explain the purpose of the task, to check understanding, to socialize with her students and to manage the class (see 5 & 6). will write the message to them. So, let's try today. T: Qui a compris là ce que je viens de dire? ((Who has understood what I've just said?)) Ss (some): En fait on va écrire une lettre. ((In fact, we will write a letter.)) T: By computer. Ss (some): On va écrire une lettre ! ((We will write a letter.)) T: By computer! …[ S: J'ai déjà vue. ((I have already seen it.

Figure 4 :

 4 Figure 4: Scaffolding strategies used by the teachers (T=Teacher)

Figure 5 :

 5 Figure 5: Corrective feedback strategies used by the teachers (T=Teacher, E=Exchanges)

  , Miranda (Unclear speech). You work with me Okay? The others…You make… You will make an exercise. ((He uses the wrong verb 'make' with the word exercise)) Ss: On va faire un exercice. [We will do an exercise.] [Unclear and overlapping speech.]

Figure 6 :

 6 Figure 6: Problems linked to the teachers' L2 competence (T=Teacher)

Figure 7 :

 7 Figure 7: Passive learner involvement (T=Teacher, L=Learners)

Figure 8 :

 8 Figure 8: Active learner involvement (T=Teacher, L=Learners)

Figure 9 :

 9 Figure 9: Activity types used in minutes (T=Teacher)

Table 2 :

 2 Transcription notation used in the study (adapted from[START_REF] Jefferson | Glossary of transcript symbols with an introduction[END_REF]

	Symbol	Name	Use
	[ italic text]	Square brackets	Indicates the start and end points of overlapping speech.
	((italic text ))	Double Parentheses	Indicates comments, translation, or annotation of non-verbal activity.
	(italic text)	Parentheses	Indicates speech which is unclear or in doubt in the transcript.
	…	Ellipsis	Short pause.
	°	Degree symbol	Indicates whisper or reduced volume speech.

Table 3 :

 3 The category 'Teacher'

	T-Scaffolding	T-Corrective feedback	T-Problems related	T-Use of L1 T-Activity Types
	Strategies	strategies	to L2 competence
	Checking	Direct correction	Unattended problem Use of L1	Whole class
	understanding			(Teacher)	(non-communicative activity)
	Use of gesture and	Guided correction	inauthentic		Group/pair work
	artefacts	Recast	language use		(non-or quasi-communicative
					activity)

Table 4 :

 4 The category 'Learners'

	L-Active Learner Involvement	L-Passive learner involvement	L-Use of L1
	Asking for confirmation /clarification	Reciting/performing	Use of L1
	Asking for information	Repeating
	Disagreeing
	Free language use
	Giving explanation
	Peer feedback

CONCLUSION

Several studies have reported that understanding messages conveyed by the teacher or engaging in controlled teacher-fronted mechanical activities (e.g. repetition drills or question-answer exercises) are not favourable conditions to learn an L2. It has been repeatedly reported that face-to-face small group interactions through which learners engage in cognitive activities provide the necessary conditions to use and improve L2 learning. The summary of the results showed that among these six teachers only T6 used group work activities through which the learners could engage in negotiation of meaning and free, learner-initiated language production. In this study, the analysis of the learners' and teacher's classroom interactions displayed that, although the teachers used various forms of scaffolding and feedback strategies, the following points required consideration:


Nicolas Moreau
email: nicolas.moreau@univ-reunion.fr

TRAVAIL CEMOI / CEMOI WORKING

This paper presents a SAS macro written for estimation and inference in differences-in-differences applications with clustering. Cluster robust variance estimators for within-group error correlation are implemented. Finite cluster-corrections for a few clusters are also performed.

Introduction

Here we introduce the SAS macro DiD_CLUS written for estimation and inference in differences-in-differences applications with within cluster correlation. Cluster robust variance estimators for within-cluster error correlation are implemented. Cluster-correction to improve finitesample inference when the number of clusters is small is also incorporated; it includes [START_REF] Bell | Bias reduction in standard errors for linear regression with multi-stage samples[END_REF] bias-corrected variance, Wild bootstrap and use of the distribution with [START_REF] Bell | Bias reduction in standard errors for linear regression with multi-stage samples[END_REF] and [START_REF] Imbens | Robust Standard Errors in Small Samples: Some Practical Advice[END_REF] adjusted degrees-of-freedom. 2The SAS macro DiD_CLUS considers both group×time and individual-level data. It mixes SAS procedures and lines of code written with SAS/IML. The complete code is available at http://cemoi.univreunion.fr/econometrie-avec-r-et-sas/.

Differences-in-differences estimates with the SAS macro DiD_CLUS

For group×time level data, the model is:

= + + + + , (1
) where is the policy variable, a vector of regressors, a time-invariant fixed effect for group g, a fixed time effect that is common across all groups but varies across time = 1, … , , and a groupby-time error term. The subscript g is used to index the group, the subscript t to index the time period. For individual-level data, the model specification is:

= + + + + +
, where is a vector of individual-specific regressors. Note that because the policy variable is only observed at the group×time level, it is common first to aggregate the individual-level data to the group×time level, then to OLS regress the model:

= + + + + , (2)
where is the average of the outcome variable y in group g and time period t after partialling out individual-specific covariates. To compute , DiD_CLUS uses a two-step approach advocated by [START_REF] Hansen | Generalized Least Squares Inference in Panel and Multi-level Models with Serial Correlation and Fixed Effects[END_REF], [START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF][START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF][START_REF] Cameron | A Practitioner's Guide to Cluster-Robust Inference[END_REF][START_REF] Cameron | A Practitioner's Guide to Cluster-Robust Inference[END_REF]. First, DiD_CLUS runs the OLS regression of the dependent variable on all group-by-time dummies and individual-specific covariates , with no constant. Second, equals the estimated coefficients of the group-by-time dummies. If the model does not include any individual-specific covariates, is only the average of within the group-time cell. To estimate the treatment effect and the vector of parameters , DiD_CLUS additionally partials out the group and time dummies by applying the Frisch-Waugh-Lovell theorem. DiD_CLUS regresses (or if equation ( 2) is used), , and on the group and year dummies, with no constant. Then and are estimated by regressing the residuals of (or if equation ( 2) is used) on the residuals of and , with no constant.

Inference with the SAS macro DiD_CLUS

Let denote the outcome variable in equations ( 1) and (2), and a vector that consists of all covariates and fixed effects in equations ( 1) and ( 2). Stacking all observations in the g th cluster, equations (1) and (2) can be rewritten as:

= + , = 1, … , , (3)
where and are × 1 vectors, is a matrix with rows, and there are observations in cluster g. The OLS estimator is:

= .

Given error dependence across clusters, the cluster covariance matrix estimator conditional on X is:

= .

The SAS macro DiD_CLUS computes the cluster-consistent covariance matrix estimator:

= ̂ ̂ , (4)
where ̂ =is the vector of residuals for the g th cluster. To reduce downwards bias in (4) due to finite G, the SAS macro DID_CLUS also provides two finitesample modifications of described in [START_REF] Cameron | A Practitioner's Guide to Cluster-Robust Inference[END_REF].

, uses √ ̂ in (4) instead of ̂ , with

= -1 -1 - ,
where N is the number of observations and np the number of parameters to estimate.

, uses:

= -1 .
When the number of clusters is small, test-statistics based on , , and , tend to over-reject the null. The SAS macro DiD_CLUS incorporates some of the finite-sample corrections that are presented in [START_REF] Cameron | A Practitioner's Guide to Cluster-Robust Inference[END_REF] to circumvent this problem.

Bias-corrected cluster robust covariance matrix

The bias-reduction modification developed by [START_REF] Bell | Bias reduction in standard errors for linear regression with multi-stage samples[END_REF] uses -/ ̂ in (4) rather than ̂ , where is the × matrix ( ) , and -/ the inverse of the symmetric square root of -. Therefore, the bias corrected cluster robust covariance matrix implemented in the SAS macro DiD_CLUS is:

= ∑ ∑ - / ̂ ̂ - / ∑ .

Degrees of freedom adjustment

The simplest adjustment implemented in the SAS macro DiD_CLUS is approximating the distribution of tstatistics by a T-distribution with G-1 degrees of freedom. The SAS macro DiD_CLUS further includes [START_REF] Bell | Bias reduction in standard errors for linear regression with multi-stage samples[END_REF] and [START_REF] Imbens | Robust Standard Errors in Small Samples: Some Practical Advice[END_REF] data-determined degrees of freedom. They are calculated only for t-statistics computed with .

Let G denote the × matrix with g th column equal to the N-vector:

= ( -) ( - ) / ( )
, where is the projection matrix ( ) , ( -) the × matrix that consists of the columns of ( -) corresponding to cluster g, and a vector of zeros aside from 1 in the k th position. [START_REF] Bell | Bias reduction in standard errors for linear regression with multi-stage samples[END_REF] degrees of freedom adjustment is given by:

= (∑  ) ∑ ,
where  are the eigenvalues of G T G. [START_REF] Imbens | Robust Standard Errors in Small Samples: Some Practical Advice[END_REF] degrees of freedom adjustment is:

= (∑  ) ∑ ,
where  are the eigenvalues of

G T Ω G, Ω = [ | ] assuming equicorrelated errors so that Ω = if = , Ω = if ≠ and = , Ω = 0 otherwise.

Wild cluster bootstrap

In the SAS macro DiD_CLUS, the Wild bootstrap is used to test the null hypothesis of no treatment effect = 0. Let be the estimate of the treatment effect, and let be its estimated standard error calculated with . Let = be the corresponding t-statistic. The approach is to calculate a p-value for from a distribution of B bootstrap t-statistics , = , = 1, … . There are several ways to do so. The SAS macro DiD_CLUS implements the method presented in [START_REF] Cameron | A Practitioner's Guide to Cluster-Robust Inference[END_REF]. First, estimate equation (3) under the null hypothesis of the no treatment effect = 0. Second, form the vector of residuals ̃ = -. Third, the value of the outcome in the b th bootstrap replication for cluster g is redrawn as: Fifth, the p-value for the t-statistic calculated on the original sample is calculated by:

̂( ) = 2min 1 ( , ≤ ) , 1 ( , > ) ,
where I(.) is the standard indicator function (see [START_REF] Webb | Reworking Wild Bootstrap Based Inference for Clustered Errors[END_REF]. [START_REF] Webb | Reworking Wild Bootstrap Based Inference for Clustered Errors[END_REF] shows that there are actually only 2 possible t-statistics in absolute value with Rademacher weights. It is a problem when G is small because unique values of , will be found multiple times in the vector of bootstrap t-statistics. The B t-statistics cannot be treated as B unique values. As a consequence, the p-value ̂( ) is not point-identified but is instead an interval [START_REF] Webb | Reworking Wild Bootstrap Based Inference for Clustered Errors[END_REF], p. 6). If = , multiple times, the SAS macro DiD_CLUS computes lower and upper bounds for ̂( ). With [START_REF] Webb | Reworking Wild Bootstrap Based Inference for Clustered Errors[END_REF] weights, this problem is really less likely to happen.

Syntax of the SAS macro DiD_CLUS

The syntax is: %DiD_CLUS(data=,depvar=,regtreat=,reg=,regind=,obsid=,groupid=,timeid=,breps=);. data specifies the input data set. depvar is the outcome variable. regtreat is the policy variable. reg specifies the list of regressors ; this list can be empty. regind specifies the list of regressors ; this list can be empty. obsid is the variable that identified the observation i; it can be empty. groupid specifies the variable that identifies the group for each observation; it cannot be empty. timeid is the variable that identifies the time period for each observation in the input data; it cannot be empty. All variables in depvar, regtreat, reg,and regind must be numeric. The parameter breps specifies the number of replications B used to perform Wild bootstrap p-values. Wild bootstrap cannot be processed if breps is left empty.

Output results of the SAS macro DiD_CLUS

The first four tables show the number and percentage of observations per group and time period as the distribution of the policy variable per group and time period. A fifth table includes preliminary estimates from a pooled OLS estimation with standard errors robust to heteroskedasticity. With group-time or individual-level panel data a two-way fixed-effects model is also estimated. Estimation results are shown in a sixth table.

The OLS differences-in-differences estimates then follow. The table named "Estimation results: estimates, t-statistics and p-values" exhibits the parameter estimates and their standard errors from various different covariance estimators. "Default" is the usual OLS standard error assuming homoskedasticity and noncorrelated errors. "White robust" is the OLS standard error robust to heteroskedasticity of unknown form. "Cluster robust" standard errors are calculated from , "Cluster robust adj1" from , , "Cluster robust adj2" from , and "Bias-corr. cluster robust" from . "P-value: z-dist" and "P-value: t-dist" are the p-values calculated using the standard normal distribution and t-distribution with G-1 degrees of freedom, respectively. "P-value: BM dof" and "P-value: IK dof " are the p-values calculating using t-distribution with [START_REF] Bell | Bias reduction in standard errors for linear regression with multi-stage samples[END_REF] and Imbens and Kolesár 's (2016) data-determined degrees of freedom. These degrees of freedom adjustments are made only for t-statistics calculated from the bias-corrected cluster robust covariance estimator.

The table named "Estimation results: estimates and 95% confidence intervals" presents lower and upper bounds of 95% confidence intervals calculated using the standard normal distribution or t-distribution with G-1 or data-determined degrees of freedom.

The table named "Data-determined degrees of freedom" indicates for each covariate the number of degrees of freedom calculated with [START_REF] Bell | Bias reduction in standard errors for linear regression with multi-stage samples[END_REF] and Imbens and Kolesár 's (2016) methodology.

The last table exhibits inference with Wild bootstrap for the treatment effect parameter .

An example

We illustrate the use of DiD_CLUS with data taken from a study of the effect of merit scholarship on college attendance as reported by [START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF]

  where the weight , is randomly assigned. With Rademacher weights, = {-1,1} and Pr( , = 1)= Pr( , = -1) = 0.5. With Webb's (2014) weights, = -√1.5, -1, -0.5, 0.5, 1, √1.5 and Pr , = -√1.5 = Pr , = -1 = Pr , = -√0.5 = Pr , = √0.5 = Pr , = 1 = Pr , = √1.5 = 1/6. Fourth, regress on to obtain . Extract from and compute the bootstrap t-statistic , = .

  -values are calculated using t-distribution with data-determined degrees of freedom. Standard errors from the bias-corrected cluster robust covariance estimator are used.Note: lower and upper bounds of confidence intervals are calculated using the standard normal distribution and t-distribution with G-1 degrees of freedom, respectively. Estimate L.bound/BM dof U.bound/BM dof L.bound/IK dof U.bound/IK dof Notes: lower and upper bounds of confidence intervals are calculated using t-distribution with data-determined degrees of freedom. Standard errors from the bias-corrected cluster robust covariance estimator are used.

	time_d2			1		-0.00802		0.01064	-0.75	0.4512
	time_d3 Parameter: MERIT		1 0.051209	0.00907 .	.	0.01084	0.84 .	0.4024	.
	time_d4 Standard Errors:		1	Parameter Estimates 0.01108 . .	.	0.01105	1.00 .	0.3160	.
	time_d5 time_d6 Usual White robust			1 1	Parameter 0.02070 0.01632 . 0.0143115 0.0881065 . 0.0257248 0.0766932	Standard 0.01107 0.01117	1.87 1.46 . .	0.0615 0.1440	. .
	Variable time_d7 Cluster robust Label		DF 1	Estimate -0.00287 . 0.0304136 0.0720044	Error 0.01135 0.029898 t Value -0.25	Pr > |t| 0.8005 0.07252
	merit time_d8 time_d9 Cluster robust adj1 Policy variable Cluster robust adj2	1 1 1	0.03375 0.01903 0.00967 . 0.0302067 0.0722113 . 0.0302067 0.0722113	0.01470 0.01149 0.01150	2.30 1.66 0.84 0.029686 0.029686	0.0217 0.0976 0.4007 0.072732 0.072732
	male time_d10 Bias-corr. cluster robust		1 1	-0.07885 0.02467 . 0.0298327 0.0725853	0.00477 0.01147 0.0293027 -16.53 2.15	<.0001 0.0315 0.0731153
	black asian time_d11 time_d12			1 1 1 1		-0.15037 0.16895 0.00253 0.01233		0.00756 0.01360 0.01147 0.01181	-19.90 12.42 0.22 1.04	<.0001 <.0001 0.8255 0.2964
	group_d1			1		0.44189		0.02538	17.41	<.0001
	group_d2 group_d3			1 1 HCC Approximation Method: HC1 0.48890 0.02729 0.44509 0.02823	17.91 15.77	<.0001 <.0001
	group_d4		1 PANEL DATA ESTIMATION NOT POSSIBLE 0.58175 0.01567	37.13	<.0001
	group_d5 POOLED DATA ARE USED OR THE INDIVIDUAL IDENTIFICATION VARIABLE IS MISSING 1 0.52340 0.02771 18.89	<.0001
	group_d6 group_d7 MERIT 0.051209	1 1 0.0269475	0.59926 0.53305 0.0754705		0.02558 0.01210 0.0269475	23.42 44.04 0.0754705 <.0001 <.0001
	group_d8 group_d9 group_d10 coll=1 if college attendance, 0 otherwise AGGREGATED DATA: DESCRIPTIVE STATISTICS 1 0.58294 0.01480 . 1 0.50672 0.01399 1 0.50077 0.01358 group_d11 1 0.43962 0.02225 Number of observations 612 merit= 1 if recipient of merit scholarship, 0 otherwise male= 1 if male, 0 otherwise group_d14 1 0.53053 0.02125 black= 1 if Black , 0 otherwise group_d12 1 0.56045 0.01398 group_d13 1 0.53030 0.01380 Number of clusters 51 Number of time periods 12	39.39 36.21 36.87 19.76 24.97 40.09 38.43	<.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001
	asian= 1 if Asian, 0 otherwise group_d15		1		0.47447		0.02237	21.21	<.0001
	state: state of residence group_d16 group_d17 ESTIMATION RESULTS: ESTIMATES, T-STATISTICS AND P-VALUES 1 0.54112 0.02221 24.36 1 0.49042 0.02403 20.41 year: time period. group_d18 1 0.57161 0.02068 27.64 Estimate Std. Err T-stat P-value: z-dist P-value: t-dist <.0001 <.0001 <.0001
	The instructions: group_d19 group_d20 Parameter: MERIT %DiD_CLUS(data=lib.regmraw,depvar=coll,regtreat=merit,reg=,regind=male black 1 0.45182 0.01969 22.95 1 0.54049 0.02091 25.84 0.051209 . . . group_d21 1 0.54301 0.02138 25.39 Standard Errors: . . . . asian,obsid=,groupid=state,timeid=year,breps=999); group_d22 1 0.50654 0.02705 18.72 group_d23 1 0.57859 0.02727 21.22 Usual . 0.0188256 2.7201776 0.0065247 White robust . 0.0130024 3.9384332 0.000082	<.0001 <.0001 <.0001 . . <.0001 <.0001 . .
	give the following results: group_d24 Cluster robust		1	0.50390 . 0.0106101 4.8264485	0.02913 1.3899E-6 17.30	<.0001 0.0000135
	group_d25 group_d26 Cluster robust adj1 Cluster robust adj2 POOLED OLS ESTIMATION ON ORIGINAL DATA, WITHIN CLUSTER CORRELATION NOT ACCOUNTED FOR 1 0.57431 0.02151 26.70 <.0001 1 0.43525 0.02126 20.48 <.0001 . 0.0107157 4.7788962 1.7626E-6 0.0000159 . 0.0107157 4.7788962 1.7626E-6 0.0000159 group_d27 1 0.51389 0.01483 34.66 <.0001 Bias-corr. cluster robust . 0.0109065 4.6952807 2.6624E-6 0.0000211
	group_d28 group_d31 group_d29 group_d30 Note: p-values are calculated using the standard normal distribution and t-distribution with 1 0.51174 0.02278 22.46 <.0001 The REG Procedure Model: MODEL1 1 0.40703 0.02283 17.83 <.0001 Dependent Variable: coll 1 0.41597 0.02316 17.96 <.0001 1 0.42825 0.01453 29.48 <.0001 G-1 degrees of freedom, respectively.
	group_d34 group_d32 group_d33	Number of Observations Read Number of Observations Used 1 0.50588 1 0.38851 1 0.50051 Estimate Std. Err T-stat P-value: BM dof P-value: IK dof 42161 0.02238 22.60 42161 0.02291 16.96 0.02108 23.74	<.0001 <.0001 <.0001
	group_d35 group_d36 Source MERIT 0.051209 0.0109065 4.6952807 1 0.36365 1 0.47254 NOTE: No intercept in model. R-Square is redefined. 0.02469 0.02171 0.0008202 0.0008202 14.73 21.76 Analysis of Variance Sum of Mean DF Squares Square F Value group_d37 1 0.46977 0.02200 21.35 group_d38 1 0.41682 0.01289 32.33 group_d39 1 0.46144 0.02128 21.69 group_d40 1 0.39404 0.02065 19.08 group_d41 1 0.44630 0.02212 20.18 Notes: pData-determined degrees of freedom Pr > F <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 Model 66 8677.28767 131.47406 549.77 group_d42 1 0.40811 0.02394 17.05 <.0001 group_d43 1 0.37935 0.02233 16.99 MERIT <.0001 <.0001 Error 42095 10067 group_d44 1 0.40770 0.02216 18.40 <.0001 Bell and McCaffrey degrees of freedom 10.122 0.23914 Uncorrected Total 42161 18744 group_d45 1 0.45571 0.01993 22.87 <.0001 group_d46 1 0.34546 0.02504 13.80 <.0001 Imbens and Kolesár degrees of freedom 10.122
	group_d47			1		0.45079		0.02412	18.69	<.0001
	group_d48 group_d49 group_d50 group_d51	Root MSE ESTIMATION RESULTS: ESTIMATES AND 95% CONFIDENCE INTERVALS 0.48902 R-Square 1 0.44806 0.02295 19.52 1 0.46756 0.01134 41.24 0.4629 Dependent Mean 0.44458 Adj R-Sq 1 0.41204 0.02178 18.91 0.4621 Coeff Var 109.99608 1 0.40842 0.02819 14.49 Estimate L.bound U.bound L.bound/dof=G-1 U.bound/dof=G-1 <.0001 <.0001 <.0001 <.0001

One of the problems for statistical inference with few clusters is over-rejection of the null hypothesis. We refer the reader to[START_REF] Cameron | A Practitioner's Guide to Cluster-Robust Inference[END_REF] for a clear and comprehensive presentation of existing corrections.

ESTIMATION RESULTS: INFERENCE FOR THE TREATMENT EFFECT WITH WILD BOOTSTRAP POINT-IDENTIFIED P-VALUES Policy variable: merit Parameter estimate 0.051209 Cluster robust SE 0.0106101 T-statistic 4.8264485 Bootstrap p-value Rademacher 2 weights 0.002002 Bootstrap p-value Webb 6 weights 0.002002


Nicolas Moreau
email: nicolas.moreau@univ-reunion.fr

TRAVAIL CEMOI / CEMOI WORKING PAPERS A SAS macro for estimation and inference in differences-in-differences applications with only a few treated groups

This paper presents a SAS macro written for estimation and inference in differences-in-differences applications with only a few treated groups following Conley and Taber's (2011) methodology.

Introduction

Here we introduce the SAS macro DiD_CT written for estimation and inference in differences-indifferences applications with only a few treated groups following [START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF] methodology. [START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF] show that the point estimator of the treatment effect is not consistent when the number of treatment groups is small, even for a large number of control groups. However, it is still possible to conduct inference about treatment effect using information in the error term from the control groups. The SAS macro DiD_CT considers both group×time and individual-level data. It mixes SAS procedures and lines of code written with SAS/IML. The complete code is available at http://cemoi.univ-reunion.fr/econometrie-avec-r-et-sas/.

Differences-in-differences estimates with the SAS macro DiD_CT

For group×time level data, the model is:

= + + + + , (1
) where is the policy variable, a vector of regressors, a time-invariant fixed effect for group g, a fixed time effect that is common across all groups but varies across time = 1, … , , and a group-by-time error term. For individual-level data, the model specification is:

= + + + + + + ,
where is a vector of individual-specific regressors and another error term. Note that because the policy variable is only observed at the group×time level, it is common first to aggregate the individual-level data to the group×time level and then to OLS regress the model:

= + + + + , (2)
where is the average of the outcome variable y in group g and time period t after partialling out individual-specific covariates. To compute , DiD_CT uses a two-step approach advocated by [START_REF] Hansen | Generalized Least Squares Inference in Panel and Multi-level Models with Serial Correlation and Fixed Effects[END_REF], [START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF][START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF][START_REF] Cameron | A Practitioner's Guide to Cluster-Robust Inference[END_REF][START_REF] Cameron | A Practitioner's Guide to Cluster-Robust Inference[END_REF]. First, DiD_CT runs the OLS regression of the dependent variable on all group-by-time dummies and individual-specific covariates , with no constant. Second, equals the estimated coefficients of the group-by-time dummies. If the model does not include any individual-specific covariates, is only the average of within the group-time cell. To estimate the treatment effect and the vector of parameters , DiD_CT allows the user to directly estimate equations (1) and (2) or to additionally partial out the group and time dummies by applying the Frisch-Waugh-Lovell theorem. In the latter case, DiD_CT regresses , , , and on the group and year dummies, with no constant. Then and are estimated by regressing the residuals of on the residuals of and , with no constant.

Inference with the SAS macro DiD_CT 2

DiD_CT tests the null hypothesis of the no treatment effect = 0. To make the inference valid, the approach of [START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF] is to use as a test statistic and construct an acceptance region from a distribution of simulated values for the test statistic under the null. The null hypothesis is rejected if falls outside the acceptance region. [START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF] consider two such empirical distributions ( ) and * ( ). Both are based on a ratio of cross products of deviations from the mean of the policy variable from treatment groups with residuals to the sum of squared deviations from the mean of the policy variable from treatment groups. Let and be the number of control and treatment groups, respectively. Let be the vector of constrained residuals from the constrained estimation of equation (1) under the null hypothesis of no treatment effect. Let be the vector of constrained residuals from control group l. The basic building block of ( ) is the following ratio:

∑ ( -̅ ) ∑ ∑ -̅ .
For each treatment group g, there are ratios of the kind. Let be the set that contains these ratios for g=1,..., . Now, select one ratio from each set and add them to obtain one particular element of ( ) . As there are possible combinations to attain this particular sum, the distribution ( ) contains elements. This number tends quickly to infinity even for moderate values of and . To avoid this problem, DiD_CT allows the user to specify the maximum number of combinations used to approximate the distribution ( ). Let maxcomb be this number. Then DiD_CT randomly draws K ratios without replacement from each set such that = . To obtain the empirical distribution * ( ), the residuals under the null hypothesis for the treatment groups are used along with the residuals from controls to form + vectors of residuals of dimension T. Let be the vector of residuals under the null for group l=1,..., + .Then of these vectors are randomly taken without replacement to form the particular ratio:

∑ ∑ ( -̅ ) ∑ ∑ -̅ .
As there are

( )!
! ! different possibilities to choose elements without replacement from a set with + elements, the empirical distribution * ( ) includes

( )!
! ! ratios. DiD_CT allows the user to randomly draw maxcomb of these elements to approximate the distribution * ( ). DiD_CT provides two estimators for * ( ). The first is labelled * ( ) ; it uses the constrained residuals for . The second is * ( ); it uses the unconstrained residuals from the estimation of equation ( 1) for the controls and forms residuals under the null hypothesis for the treatment groups as = + . For each of the three distributions ( ), * ( ), and * ( ), DiD_CT supplies the lower and upper bounds for the 90%, 95%, and 99% acceptance regions. At the 5% level, for instance, and using ( ), the lower and upper bounds are defined as L. bound= (0.05) and U. bound= (0.95) , respectively. Reject the null if falls outside the acceptance region.

Syntax of the SAS macro DiD_CT

The syntax is: %DiD_CT (data=,depvar=,regtreat=,reg=,regind=,groupid=,timeid=,parout=,maxcomb=). data specifies the input data set. depvar is the outcome variable. regtreat is the policy variable. reg specifies the list of regressors ; this list can be empty. regind specifies the list of regressors ; this list can be empty. groupid specifies the variable that identifies the group for each observation; it cannot be empty. timeid is the variable that identifies the time period for each observation in the input data; it cannot be empty. All variables in depvar, regtreat, reg,and regind must be numeric. The parameter parout is used to additionally partial out the group and time dummies. This is the default option if parout is not specified by the user. If parout =no or parout =none (or whatever character/value except a blank), the direct estimation of equation ( 1) is provided. The parameter maxcomb specifies the maximum number of combinations used to simulate the distributions ( ) , * ( ) , and * ( ) . maxcomb is non-binding if the number of all possible combinations is less than maxcomb; it cannot be empty.

Note that inference with only a few treatment groups cannot be processed from the empirical distributions ( ) and * ( ) if the parameters reg and parout are both left empty. It is not possible to form residuals under the null hypothesis of no treatment effect in that case. If the model does not include any regressor , parout must be completed.

Output results of the SAS macro DiD_CT

Several tables show the number and percentage of observations per group and time period as the distribution of the policy variable per group and time period.

The estimation results are presented in two different tables. The first exhibits the estimate of the treatment parameter followed by the lower and upper bounds of the corresponding 90%, 95%, and 99% acceptance regions for the distributions ( ), * ( ), and * ( ).

The second table presents the estimated parameters and (if any) and their standard errors from three different cluster robust variance estimators. The first is the typical cluster robust variance estimator. The second (called "Cluster Robust adj1" in the table) uses the correction for the typical cluster robust variance estimator, where N is the number of observations and k the number of parameters to be estimated. The third (called "Cluster Robust adj2") uses the correction .

T-statistics and corresponding p-values then follow.

An example

We illustrate the use of DiD_CT with data taken from a study of the effect of merit scholarship on college attendance as reported by [START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF]

  U. Bound L. Bound U. Bound L. Bound U. Bound 90% Acceptance region -0.022134 0.0166082 -0.029465 0.0271678 -0.023567 0.0330664 95% Acceptance region -0.023687 0.0181432 -0.035221 0.0323397 -0.029322 0.0382383 99% Acceptance region -0.025631 0.0201046 -0.045411 0.0424672 -0.039513 0.0483657 Number of combinations used for the empirical distribution Gamma(w): 1024 Number of combinations used for the empirical distributions Gamma*(w):

We refer the reader to[START_REF] Conley | Inference with 'Difference in Differences' with a Small Number of Policy Changes[END_REF] for a clear and comprehensive presentation of the methodology at stake.


Nicolas Moreau
email: nicolas.moreau@univ-reunion.fr

TRAVAIL CEMOI / CEMOI WORKING PAPERS A SAS macro to perform Dong and Lewbel's "Simple Estimator for Binary Choice Models" (2015)

Keywords:

This paper presents a SAS macro to estimate Dong and Lewbel's "Simple Estimator for Binary Choice Models with Endogenous Regressors" (2015) on cross-section data.

Introduction

We introduce the SAS macro specreg written to perform Dong and Lewbel's "Simple Estimator for Binary Choice Models with Endogenous Regressors" (2015) on cross-section data. The computation requires several steps, all of which are written in specreg in SAS Interactive Matrix Language (IML) without resorting to existent procedures. We hope that this helps the user to gain a clear understanding of the "mechanics" behind the estimator.

Although it is usually advisable to use matrix calculation rather than "do loops" in SAS/IML, specreg relies heavily on looping, because otherwise it is unlikely to obtain estimates in a reasonable amount of time for very large datasets. The complete SAS/IML code is available at http://cemoi.univreunion.fr.

A brief presentation of Dong and Lewbel's (2015) simple estimator for binary choice models

The binary choice model is:

= ( + + ≥ 0), whereD is the dependent variable, V the special regressor, and X the matrix of all other regressors in the model. The special regressor is supposed to have a positive impact on the binary outcome; its impact is normalized to 1. Some or all of the elements of X can be endogenous. Let Z be the matrix of excluded instruments from the model. Let S be the matrix of all the elements of X and Z.

To find the vector of estimates , it is necessary to: -run an OLS regression of V on S and save the residuals from this regression.

-perform White's test to assess whether the error term u from the preceding regression is heteroscedastic. This involves running an OLS regression of on , where includes all the elements of S and all the squares and cross products of all the elements of S.Let ̂ be the fitted values from this regression.

-estimate for each observation i the nonparametric density ( ) if the error term u is homoscedastic or otherwise the nonparametric density ( ̂).

-construct for each observation i the variable defined as = [ -( ≥ 0)]/ if the error term u is homoscedastic or otherwise as = [ -( ≥ 0)][ ]/ . -run a IV regression of on X using excluded instruments Z to obtain . The estimated mean marginal effects of X on choice probabilities are calculated as = ∑ , with being the first derivative of the average index function with respect to X evaluated at (see [START_REF] Lewbel | Comparing Features of Convenient Estimators for Binary Choice Models With Endogenous Regressors[END_REF].

Finally, statistical inference for the parameters of interest and marginal effects at the mean are provided with bootstrapping.

Syntax of the SAS macro specreg

The syntax is %macro specreg (data=,depvar=,specreg=,regendo=,regexo=,instr=,density=,trim=,het=,hetvar=,ilpm=,nboot=); Data specifies the data set. depvar is the binary outcome variable. specreg is the special regressor. regexo specifies the list of exogenous regressors; this list can be empty. regendo specifies the list of endogenous regressors; if this list is empty, IV regressions reduce to OLS estimations. instr specifies the list of excluded instruments from the regression; instr can be empty if there are no endogenous regressors in regendo. All variables in depvar, specreg, regexo, regendo, and instr must be numeric.

The parameter density is used to select a non-parametric estimator for the density of the residuals, with the possibility of five choices. The default is the sorted data estimator of [START_REF] Lewbel | Semiparametric Qualitative Response Model Estimation With Unknown Heteroscedasticity or Instrumental Variables[END_REF] and [START_REF] Lewbel | A Simple Ordered Data Estimator for Inverse Density Weighted Functions[END_REF] if density is not specified by the user.

If density=1, the standard normal kernel (mean=0, standard deviation=1) with Silverman's rule of thumb for bandwidth selection is computed. If density=2, the Epanechnikov kernel with Silverman's rule of thumb for bandwidth selection is used instead.

If density=1 or density=2, direct evaluation of the kernel density occurs at any point i. This involves N kernel evaluations per observation requiring a total of N×N kernel evaluations, where N is the sample size. If density=3 or density=4, direct evaluation of the kernel density at any point i only involves 401 evaluations from a grid, requiring a total of N×401 kernel evaluations. This significantly decreases calculation time for a large N. If density=3 (or 4), the standard normal (Epanechnikov) kernel is used.

The parameter trim specifies the percentage applied to remove the top and bottom values of . For instance, when trim=5, the left-most and right-most 5% of observations are removed. When trim=0.05, the bottom and top 0.05% are excluded. The default is no trimming if trim is not specified by the user.

White's test for heteroscedasticity of the special regressor is automatically supplied. If it is heteroscedastic (at the 5% level), specreg switches to the estimator robust to heteroscedasticity. The user can still request the primary estimator to be computed by specifying the parameter het. If het=no, het=0, or het=none (or whatever character/value except a blank), the primary estimator is computed regardless of whether the homoscedasticity assumption is rejected or not.

To perform White's test, all the elements of S and all the squares and cross products of all the elements of S are automatically used (see [START_REF] Dong | A Simple Estimator for Binary Choice Models With Endogenous Regressors[END_REF]. Some of these variables may be redundant if S includes dummies or squared variables, for instance. Duplicate variables are then removed.

The user may not want to perform the pure form of White's test if the corresponding regression involves a large number of covariates. With the parameter hetvar, users can specify their own list of squares and cross products to add to S. The default is the pure form of White's test if hetvar is not specified by the user.

Nboot is the number of bootstrapped samples drawn to provide bootstrap standard errors for the estimated parameters and marginal effects at the mean. No statistical inference is produced if nboot is not specified be the user.

Note that specreg will stop executing if: -the dependent variable or the special regressor are not specified -the dependent variable is not binary 0 and 1 -the number of excluded instruments is less than the number of endogenous regressors -not any regressors are specified -some variables have missing values.

Results presentation and output data files

A first table provides descriptive statistics for the dependent variable, regressors, and excluded instruments.

A second table includes preliminary estimates from an instrumental linear probability model. This preliminary estimation procedure is used to verify the positive effect of the special regressor on the dependent variable. As [START_REF] Dong | A Simple Estimator for Binary Choice Models With Endogenous Regressors[END_REF] point out, a positive effect is requested for the estimator to be valid. If the estimated sign appears to be negative, the negative of the special regressor is automatically used afterwards. However, if ilpm=no, ilpm=0, or ilpm=none (or whatever character/value except a blank), this step is ignored: the linear probability model is not estimated and the possible change of sign of the special regressor not made.

White's test for heteroscedasticity with the special regressor is then presented.

Two validity checks are shown, both of which relate to the support of the special regressor. The first evaluates whether the empirical distribution of the special regressor exhibits excess kurtosis. A negative value indicates a light-tailed distribution relative to the standard normal, which may weaken the results. The second compares the spread of observations of the special regressor to the spread of the fitted values. Measures of the empirical spread of the special regressor have to be at least comparable to those of .

A third table presents the parameter estimates along with bootstrap standard errors, corresponding tstatistics, and p-values. The fourth table provides the 99%, 95%, and 90% confidence intervals for the parameters of interest, respectively. The confidence intervals are computed using the percentile method.

A fifth table shows the estimates for the marginal effects at the mean along with bootstrap standard errors, corresponding t-statistics, and p-values. The sixth and final table includes the 99%, 95%, and 90% confidence intervals for the marginal effects at the mean, respectively.

Four temporary output data files are created. discarded_obs includes the internal identification number of observations that are removed from the estimation procedure when trimming. bootselec includes the internal identification number of observations contained in each bootstrap sample. bviboot includes the parameter estimates obtained on each bootstrap sample, whereas mean_meffects_boot includes the corresponding estimated mean marginal effects.

Some examples

The dependent variable is y 1 , the special regressor is x 0 , the endogenous regressor is x 1 . All variables from x 2 to x 12 are exogenous regressors. The excluded instruments are x 13 and x 14 . All variables except x 2 and x 3 are binary. The number of observations is 19957.

Macro call (1):

%specreg(data=file1,depvar=y1,specreg=X0,regendo=X1,regexo=X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12, instr=X13 X14,density=2,trim=5,het=no,hetvar=,ilpm=,nboot=99), performs the estimator with the Epanechnikov kernel to estimate the nonparametric density of the residuals. The Epanechnikov kernel is also used to estimate the marginal effects at the mean. The leftmost and right-most 5% of observations are removed, while 99 bootstrap replications are used for statistical inference.

All the elements of regendo, regexo, and instr as well as all the non-redundant squares and cross products of all of these elements are used to perform White's test.

The simple estimator that does not account for heteroscedasticity is computed, even if the assumption of homoscedasticity is rejected.

In contrast, the macro call:

%specreg(data=file1,depvar=y1,specreg=X0,regendo=X1,regexo=X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12, instr=X13 X14,density=2,trim=5,het=,hetvar=,ilpm=,nboot=99), performs the simple estimator that accounts for heteroscedasticity if the assumption of homoscedasticity is rejected. All the elements of regendo, regexo, and instr as well as all the nonredundant squares and cross products of all of these elements are used to perform the estimator.

The macro call:

%specreg(data=file1,depvar=y1,specreg=X0,regendo=X1,regexo=X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12, instr=X13 X14,density=2,trim=5,het=,hetvar=X22 X33 X23,ilpm=,nboot=99), only uses the variables x 22 , x 33 , and x 23 as cross products and to perform White's test and the estimator robust to heteroscedasticity, with x 22 = x 2 x 2 , x 33 = x 3 x 3 , and x 23 = x 2 x 3 .

Computation takes 1 h 1 min with macro call (1); the corresponding outputs are presented below.

  Computation time decreases to 31 min with the nonparametric estimation of the density of the residuals with 401 evaluations per observation (density=4); it is reduced to 32 min when the sorted density estimator (default, when density=) is used. In comparison, computation takes 1 h 52 min with the standard normal kernel (density=1) and 54 min with the standard normal kernel and 401 grid point evaluations (density=3).

					Desccriptive statistics
			N				Lower
	Variable ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ N Miss Minimum 10th Pctl Quartile Median Mean
	y1	19957	0	0.00		0.00	0.00	1.00	0.70
	x0	19957	0	21.00		27.00	31.00	35.00	34.54
	x1	19957	0	0.00		0.00	0.00	0.00	0.39
	x2	19957	0	14.00		17.00	19.00	22.00	22.43
	x3	19957	0	0.00		2.00	2.00	4.00	4.25
	x4 x5	19957 19957	0 0	0.00 0.00		0.00 0.00	0.00 0.00	0.00 0.00	0.40 0.27
	x6	19957	0	0.00		0.00	0.00	0.00	0.09
	x7	19957	0	0.00		0.00	0.00	0.00	0.08
	x8	19957	0	0.00		0.00	0.00	0.00	0.19
	x9	19957	0	0.00		0.00	0.00	0.00	0.21
	x10	19957	0	0.00		0.00	0.00	0.00	0.20
	x11	19957	0	0.00		0.00	0.00	0.00	0.19
	x12 x13	19957 19957	0 0	0.00 0.00		0.00 0.00	0.00 0.00	0.00 1.00	0.04 0.51
	x14	19957	0	0.00		0.00	0.00	0.00	0.01
	ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
						Upper
		Variable		Std Dev	Quartile	90th Pctl	Maximum
		ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
		y1		0.46		1.00	1.00	1.00
		x0		4.87		39.00	40.00	41.00
		x1		0.49		1.00	1.00	1.00
		x2 x3		4.17 2.68		25.00 6.00	28.00 8.00	38.00 23.00
		x4		0.49		1.00	1.00	1.00
		x5		0.44		1.00	1.00	1.00
		x6		0.28		0.00	0.00	1.00
		x7		0.27		0.00	0.00	1.00
		x8		0.39		0.00	1.00	1.00
		x9		0.41		0.00	1.00	1.00
		x10 x11		0.40 0.39		0.00 0.00	1.00 1.00	1.00 1.00
		x12		0.19		0.00	0.00	1.00
		x13		0.50		1.00	1.00	1.00
		x14		0.12		0.00	0.00	1.00
		ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
		Preliminary estimation with the instrumental variables linear probability model
				Parameter Estimate	Standard Error	T-statistic	P-value