Hideaki Mizuhashi

Masayoshi Kamijo
email: kamijo@shinshu-u.ac.jp

Hiroaki Yoshida

Harumi Tamaki
email: harumi@tamac.co.jp

Investigation of comfort of uniform shirt made of cellulose considering environmental load

The purpose of this study is to evaluate the wearing comfort of uniform-shirts and to investigate the suitable value for the preset temperature of a i r c o n d i t i o n e r s t h o r o u g h m e a s u r i n g m a t e r i a l p r o p e r t i e s a n d psychophysiological responses. The uniform shirt was made of cellulose materials such as rayon and tencel for wearing in hot conditions like summers in Japan. Material properties measurement were made according to Kawabata Evaluation System (KES), Japan Industrial Standards (JIS) and Moisture Management Tester (MMT). Physiological response measurements were electrocardiogram (ECG), respiration, skin temperature and the humidity inside the clothes. Psychological response measurements were by semantic differential method and ranking method. We concluded that the uniform shirts made of rayon are comfortable even in hot conditions like summer in Japan. 29˚C as the temperature setting of air conditioners is too hot for people. Respiration seems to be an important factor for evaluation of wearing comfort.

Introduction

In Japan, the summer is a hot season with high humidity. For Japanese workers, thermal stress is a great annoyance in the summer. A uniform shirt is something that workers must wear. So the thermal stress of uniform shirts should be minimized. Cellulose materials such as tencel and rayon have characteristics such as high thermal conductivity and hydrophilicity suitable for reducing thermal stress. Cellulose also has low environmental impact since it can be turned back into soil. The purpose of this study is to develop comfortable uniform shirts made of cellulose. We used rayon and tencel as the cellulose materials. In terms of environment loading, tencel is lower than rayon because the waste fluid can be recycled as a soap. We manufactured trial uniform shirts and evaluated the wearing comfort by psychophysiological measurements and material properties evaluation. The Japanese government recommends setting the air conditioner to 28˚C in the summer. If the temperature setting of the air conditioner is increased by 1˚C, power consumption will be reduced by 13% [START_REF]Ministry of the Environment of Japan : Power-saving actions that can taken in the office[END_REF]. So we examined the temperature setting of air conditioners by comparing 28˚C and 29˚C from the viewpoint of wearing comfort.

Experiment

Samples

Table 1 shows the information of 3 types of samples with flat woven structure. Tencel, rayon, cotton and polyester were used to create the samples. R100 was composed of 100% rayon. The materials of R/T were rayon and tencel. The warp of R/T was 100% rayon. The weft of R/T was 100% tencel. P/C was composed of blended yarn made of 65% polyester and 35% cotton. P/C was the conventional product and R100 and R/T were the improved products.

Material properties Evaluation

This experiment was for evaluation of the heat and moisture transport properties of the 3 fabrics shown in Table 2. All items were measured 5 times. The mean value of those measurements was used as the representative value.

Japan Industrial Standards

For moisture transfer properties, moisture permeability and moisture content were measured. Moisture permeability was measured using the water method defined in JIS L 1099 A-2. A moisture-permeable cup is filled to 10mm of the upper rim of the cup with water at 40°C. The fabric is attached to the top of the cup so that the back side faces the water surface. Then, the cut surfaces of the test piece are covered with vinyl tape so that water vapors cannot escape. The cup prepared in this way is placed in a constant-temperature, constant-humidity environment at 40°C and 50%RH for 1 hour.

Then the initial weight of the cup (a1) is measured. Next, the weight of the cup after one hour has elapsed (a2) is measured. The moisture permeability (MP) is then derived from the following equation. In this equation, S is the water-vapor-permeating surface area of the test piece.

MP = 10 × (a 1 -a 2 ) S [g / m² • h]
The moisture absorbency of textile products is determined according to the moisture ratio which is the percentage of atmospheric moisture that is absorbed. Dry-state textiles placed in the atmosphere absorb water vapors in the air to reach equilibrium. The moisture content (MC) defined in JIS L 1096 is expressed using Wd and Ww according to the following equation.

MC = Ww -Wd Wd × 100[%]
In this equation, Wd is the weight of the textile in its absolute dry state, and Ww is the weight of the textile after being left in a constant-temperature, constant-humidity environment for more than 24 hours. In this research, the moisture content was measured at 28°C and 65% RH.

Kawabata Evaluation System

The air permeability property R was measured using KES-F8. R is the air flow resistance. The thermal properties q-max, K' and Qd were measured using KES-F7. q-max is the initial maximum heat flux when the copper plate heated to 30°C was put on the fabric. K' is the steady state thermal conductivity when a heat source at 30˚C is placed on the fabric on top of a cool box at 20˚C. Qd is the thermal insulation rate when air is blown on at an air flow of 0.3m/s. Measurement conditions were 20˚C and 65% RH.

Moisture Management Tester

The Moisture Management Tester (MMT) is the device for analyzing 3 dimensional water transport properties. Measurement items were wetting time, water absorption rate, maximum wetted radius, spreading speed, one way transport capacity (OWTC) and overall moisture management capacity (OMMC). Data were measured on both sides except for OWTC and OMMC. OWTC is the difference of the integral value of the time series data of moisture content calculated by subtracting the value of the bottom side from the value of the top side. OMMC is the calculated from the absorption rate of the top side, spreading speed of the bottom side and OWTC. As each value becomes greater, OWTC become greater. The measurement values were classified by software. Water injection time was 20 seconds. Observation time was 100 seconds. Water content of fabric at the end of the experiment could be confirmed by the images. Measurement conditions were 20˚C and 65% RH.

Wearing Experiment

To evaluate the wearing comfort of the uniform shirts, psychological responses and physiological responses of subjects were measured while wearing the shirt. The items measured for the physiological responses were electrocardiograms (ECG), respiration, skin temperature and humidity inside the clothes. For the psychological response, impression data on the feelings of warmth and comfort were obtained by the SD method and ranking method. This experiment aimed to observe the body temperature increase after moving from a room at 25°C and 50% RH to the room with hot condition. Experimental conditions were 28°C and 65% RH or 29°C and 65% RH. Fig. 1 shows the protocol of the experiment. Each subjects participated for 2 days at the pace of 1 condition per day. 3 samples were evaluated for each condition. At first, subjects were in a room at 25˚C and 50% RH for 13minutes wearing T-shirts, shorts, underwear and socks. In the next 2 minutes, subjects moved from 25˚C and 50% RH to the hot conditions and then took off the T-shirts and put on the uniform shirts. After that, evaluation of the sample was carried out for 22 minutes. The subjects remained seated and relaxed in a chair except for 2 minutes of moving. Skin temperature and humidity inside the cloth were measured every minute from the beginning of the experiment. The temperature and humidity sensor was the Hygrochron from KN Laboratories. Skin temperature was measured by Ramanathan 4-points method. Humidity was measured at 4 points: On the chest, the abdomen, the upper part of the back and the lower part of the back. Measurement periods of ECG and respiration were 2 minutes. ECG and respiration measurements were taken twice, once at 5 minutes after the start of the experiment and again at the end of experiment. ECG was measured by the bipolar chest lead method. Respiration was measured by a thermistor (BIOPAC TDS202A) attached below the nose of subjects. Data of ECG and respiration were input to a BIOPAC MP100, and were recorded on the computer at a sampling frequency of 2000Hz. Table 3 shows the terms used for the SD method. The terms were selected to cover all feelings about wearing comfort. The evaluation scale was a seven-step scale (Word on left end of scale: Extremely ~ Very ~ Slightly ~ Neither ~ Slightly ~ Very ~ Extremely: Word on right end of scale). After examination, a score of -3 to +3 was given to quantify evaluation. The SD method was conducted 2 times: once immediately after putting on the sample shirt, and then again 15 minutes after putting on the sample shirt. Ranking was performed after the third sample had been evaluated. After all of the experiments had finished, subjects asked "Which was the day corresponding to 28˚C or 29˚C?" and "Please tell me the standards for comfort evaluation of the uniform shirts". The presentation order of samples and conditions were random. The subjects were 5 healthy male college students in their 20's. All samples were conditioned in an artificial weather room at the same conditions as the experiment for more than 24 hours before evaluation. The experiment time was unified for each subject taking into consideration their circadian rhythms. The experiment was conducted after 2 hours had elapsed since eating. The sample shape was a short-sleeved shirt with buttons in front. The size of each sample was essentially the same size as each subject normally wore.

Result and Discussion

Material Properties Evaluation

Fig. 2 shows the results of evaluation by JIS and KES. R100 had high moisture content, high moisture permeability, high q-max, high K', low Qd and low R. R100 seemed to transfer heat and moisture easily to outside the garment. Fig. 3 shows the results by MMT. R100 and R/T ware easy to wet, and P/C was difficult to wet. The size of the variation was in the following order: R100 < R/T < P/C. Fig. 4 shows a picture of the wetting by MMT [START_REF] Hu | Moisture Management Tester : A Method to Characterize Fabric Liquid Moisture Management Properties[END_REF]. R100 was the easiest to wet and had high diffusivity. The higher the variation of sample measurement values, the more difficult it was to wet the sample. R100 seems to be the most comfortable sample from the point of heat-and moisture-transfer properties.

Wearing Experiment

Fig. 5 shows the mean values for subjects of the measurement results for temperature and humidity inside the shirts. Humidity data of one subject was expected because of noise. The mean skin temperature was low when R100 and R/T were worn. The humidity of P/C was higher than others in 29˚C. The reason is considered to be it's low diffusion properties and starting temperature of sweating. Sweating of human begin when temperature become 29˚C [3]. Skin temperature and humidity were both higher in the 29˚C environment than in the 28˚C one. Fig. 6 shows the mean values of the scores for all subjects by SD method. Statistically significant differences were examined by ANOVA. 15 minutes after putting on samples, the effect of conditions were statistically significant for "Poorly-ventilated↔Well-ventilated". Stuffiness was felt more strongly at 29˚C than at 28˚C. R100 had the characteristics of being refreshing, cool, dry, well-ventilated, good texture, soft and thin. R/T was similar to R100 but the heat-and moisture-transfer characteristics were inferior compared to R100. One of the reason is considered to be it's low diffusion properties. Even though there were no difference of humidity inside the cloth between R100 and R/T, water diffusion property seem to effect human sensation from the result of MMT. P/C had characteristics which were the opposite of those of the others. Fig. 7 shows the mean values of the respiration cycles for all subjects. Long respiration cycles reflect relaxation [START_REF] Umezawa | Paradigm of relaxation evaluation : Respiration and relaxation[END_REF]. R100 is considered more comfortable than the others because the respiration cycles for R100 were marginally significant longer than for the others. Fig. 8 shows the mean values of the expiratory phase times for all subjects. The tendencies of the expiratory phase times were similar to the respiration cycles. They were significantly longer for R100 than for others. Respiration could be considered useful for evaluation of wearing comfort. 9 shows the results for skin temperature 13 minutes after the beginning of the experiments standardized by subtracting the first data. Skin temperature in the 29˚C environment increased more than in the 28˚C environment. Fig. 10 shows the results for heart rate by ECG. Marginally significant differences exist between 28˚C and 29˚C for each samples. Heart rate increased in the hotter conditions. Circulation could be considered to be increasingly active for heat dissipation. 4 subjects could distinguish between the 28˚C and 29˚C environments by introspection investigation.

The temperature setting of 29˚C seems too hot for people.

Conclusion

R100 is the most comfortable uniform shirts because of its heat-and moisturetransfer properties. If R/T had been easier to wet, the result of evaluation would be more comfortable. The psychophysiological responses were different between the 28˚C and 29˚C environments. The temperature setting should be 28˚C because 29˚C was too hot for people. Wearing comfort could be evaluated by respiration.

Fig. 1 .

 1 Fig. 1. Protocol of the wearing experiment

Fig. 4 .

 4 Fig. 4. Picture of fabric wetting

Fig. 5 .

 5 Fig. 5. Skin temperature (left) and humidity inside the cloth (right)

Fig. 6 .

 6 Fig. 6. Results of SD method : ** p<0.01 ANOVA, * p<0.05 ANOVA, s = Significant difference of sample, c = Significant difference of condition

Fig. 7 .

 7 Fig. 7. Respiration cycles : * p<0.1 ANOVA and p< 0.05 Tukey's test

Fig. 8 .

 8 Fig. 8. Expiration phase times : ** p<0.01 ANOVA and Tukey's test, * p<0.05 ANOVA and Tukey's test

Fig. 10 .

 10 Fig. 10. Heart rate : * p<0.1 ANOVA and p<0.05 Tukey's test

Table 1 .

 1 Samples

	Symbol Symbol	R100	R/T	P/C
	Material Material	Warp Weft	Rayon100% (Filament) Rayon100% (Filament)	Rayon100% (Filament) Tencel100% (Spun)	Polyester65%/ Cotton35% Polyester65%/ Cotton35%
	Yarn Yarn	Warp	120d(≒44.291S)	120d (≒44.291S)	45S
	count count	Weft	120d(≒44.291S)	40S	45S
		Warp	105 thread/inch 106 thread/inch 136 thread/inch
	Density Density
		Weft	77 thread/inch 85 thread/inch	72 thread/inch
	Structure Structure	Flat Woven Structure Flat Woven Structure Flat Woven Structure

Table 2 .

 2 Measurement items

	Block property	Symbol	Property	Unit	Reference	Condition
	Moisture Moisture	MC	Moisture content	%	JIS L 1096	28℃65%RH
	transport transport	MP	Moisture permeability	g / m² • h JIS L 1099 A-2 40℃50%RH
		q-max	Initial maximum heat flux	W/㎠
	Thermal Thermal Thermal	Qd	Thermal insulation rate (Dry method)	%	KES-F7 KES-F7 KES-F7	20℃65%RH 20℃65%RH 20℃65%RH
		K'	Steady state thermal conductivity	W
	Ventilation	R	Airflow resistance	KPa・s/m	KES-FB8	20℃65%RH
		Wt	Wetting time	s
		Ar	Absorption rate	%
	Water transport Water transport Water transport Water transport Water transport Water transport	Mwr Ss	Maximum wetted radius Spreading speed	mm mm/s	MMT MMT MMT MMT MMT MMT	20℃65%RH 20℃65%RH 20℃65%RH 20℃65%RH 20℃65%RH 20℃65%RH
		OWTC	One way transport capacity	-
		OMMC	Overall moisture management capacity	-

Table 3 .

 3 Terms used in the SD method

	Comfortable feeling overall	Comfortable⇔Uncomfortable
		Cool⇔Warm
	Thermal & moisture transport	Refreshing⇔Hot Dry⇔Damp
		Well-ventilated⇔Poorly-ventilated
		Good texture⇔Poor texture
		Rough ⇔Smooth
	Mechanical properties	Soft⇔Hard
		Restrictive⇔Not restrictive
		Thin⇔Thick

  Grade results by MMT : Left graph shows measured value and right graph shows variance

			R100	R/T	P/C
				Z-score
		-2	-1	0	1	2
		MP
		MC
		q-max
		K'
		Qd
		R
		Fig. 2. Results of Japan Industrial Standards and Kawabata Evaluation System
			R100	R/T	P/C
	Top Bottom	1 Wetting time Absorption rate Max wetted radius Spreading speed Wetting time Absorption rate Max wetted radious Spreading speed OWTC OMMC Fig. 3. Poor Fair Good 2 3	4 Very Good	5 Excellent Top Bottom	1 Wetting time Absorption rate Max wetted radius Spreading speed Wetting time Absorption rate Max wetted radious Spreading speed OWTC OMMC Very Small	2 Fair	3 Large	4 Very Large	5 Extremely Large

Acknowledgments. This work was supported by Grant-in-Aid for Scientific Research (B) (No. 25280099) of the Ministry of Education, Culture, Sports, Science, and Technology of Japan.

Table 4 shows the results of ranking of comfort criteria by introspection investigation. All subjects felt comfort with cool or chilly sensation except Subject 5. W's coefficient of concordance [START_REF] Ashoff | Warmenhaushalt In Lehrbunch der Physiologie des Menschen[END_REF] matched significantly excluding Subject 5. The criteria of Subject 5 seem to be different from other subjects. The most comfortable sample was R100 because of its cool feeling and good texture.


Gilles Durrieu

Kevin Jaunatre

Quang-Khoai Pham

Jean-Marie Tricot

extremefit: An R Package for Extreme Quantiles

Keywords: Nonparametric estimation, Tail conditional probabilities, Extreme conditional quantile, Adaptive estimation, Application and case study

extremefit is an R package to estimate the extreme quantiles and probabilities of rare events. The idea of our approach is to adjust the tail of the distribution function over a threshold with a Pareto distribution. We propose a pointwise data driven procedure to choose the threshold. To illustrate the method, we use simulated data sets example and three real-world data sets available on the package.

Introduction

Extreme values study plays an important role in several practical domain of applications, such as insurance, biology and geology. For example, in [START_REF] Buishand | On Spatial Extremes: With Application to a Rainfall Problem[END_REF], the authors study extremes to determine how severe the rainfall periods occur in North Holland. [START_REF] Sharma | Application of extreme value theory for predicting violations of air quality standards for an urban road intersection[END_REF] use extreme values procedure to predict violations of air quality standards. Various applications were presented in a lot of areas such as hydrology [START_REF] Davison | Models for Exceedances over High Thresholds[END_REF] and [START_REF] Katz | Statistics of extremes in hydrology[END_REF]), insurance [START_REF] Mcneil | Estimating the tails of loss severity distributions using extreme value theory[END_REF] and [START_REF] Rootzén | Extreme value statistics and wind storm losses: a case study[END_REF]) or finance [START_REF] Danielsson | Tail index and quantile estimation with very high frequency data[END_REF], [START_REF] Mcneil | Calculating quantile risk measures for financial return series using extreme value theory[END_REF], [START_REF] Embrechts | Extreme value theory as a risk management tool[END_REF] and [START_REF] Gencay | Extreme value theory and Value-at-Risk: Relative performance in emerging markets[END_REF]). Other applications goes from rainfall data [START_REF] Gardes | Conditional extremes from heavy -tailed distributions: an application to the estimation of extreme rainfall return levels[END_REF]) to earthquake [START_REF] Sornette | Rank-ordering statistics of extreme events: Application to the distribution of large earthquakes[END_REF]). The extreme value theory consists using appropriate statistical models to estimate extreme quantiles and probability of rare events.

The idea of the approach implemented in the extremefit package is to fit a Pareto distribution to the data over a threshold τ using the Peak-Over-Threshold method. The choice of τ is a challenging problem, a large value can lead to an important variability while a small value may increase the bias. We refer to [START_REF] Hall | Adaptive Estimates of Parameters of Regular Variation[END_REF], [START_REF] Drees | Selecting the optimal sample fraction in univariate extreme value estimation[END_REF], [START_REF] Guillou | A diagnostic for selecting the threshold in extreme-value analysis[END_REF], [START_REF] Huisman | Tail index estimates in small samples[END_REF], [START_REF] Beirlant | Statistics of Extremes: Theory and Applications[END_REF], Grama andSpokoiny (2008, 2007) and El Methni, [START_REF] El Methni | Estimation of extreme quantiles from heavy and light tailed distributions, Journal of Statistical Planning and Inference[END_REF] where several procedures for choosing the threshold τ have been proposed. Here, we adopt the method from [START_REF] Grama | Statistics of extremes by oracle estimation[END_REF] and [START_REF] Durrieu | Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles[END_REF]. The package extremefit includes the modeling of time dependent data. The analysis of time series involves a bandwidth parameter h whose data driven choice is non trivial. We refer to [START_REF] Staniswalis | The kernel estimate of a regression function in likelihood-based models[END_REF] and [START_REF] Loader | Local regression and likelihood[END_REF] for the choice of the bandwidth in a nonparametric regression. For the purposes of extreme value modeling, we use a crossvalidation approach from [START_REF] Durrieu | Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles[END_REF].

The extremefit package for the R system (R Development Core Team (2016)) is based on the methodology described in [START_REF] Durrieu | Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles[END_REF]. The package performs a nonparametric estimation of extreme quantiles and probabilities of rare events. It proposes a pointwise choice of the threshold τ and, for the time series, a global choice of the bandwidth h and gives graphical representations of the results.

The paper is organized as follows. Section 2 is an overview of several existing R packages dealing with extreme value analysis. In Section 3, we describe the model and the estimation of the parameters, including the threshold τ and the bandwidth h choices. Section 4 contains a simulation study whose aim is to illustrate the performance of our approach. In Section 5, we give several applications on real data sets and we conclude in Section 6.

Extreme value packages in R

There exist several R packages dealing with the extreme value analysis. We give a short description of some of them. For a detailed description of these packages, we refer to [START_REF] Gilleland | A software review for extreme value analysis[END_REF]. A CRAN task view exists in extreme value analysis giving a description of registered packages available in CRAN, see https://CRAN.R-project.org/ view=ExtremeValue. Some of the packages have a specific use, such as the package SpatialExtremes [START_REF] Ribatet | SpatialExtremes: Modelling Spatial Extremes. R package version 2.0-2[END_REF]), which models spatial extremes and provides maximum likelihood estimation, bayesian hierarchical and copula modeling, or the package fExtremes [START_REF] Wuertz | fExtremes: Rmetrics -Extreme Financial Market Data[END_REF]) for financial purposes using functions from the packages evd, evir and others.

The copula package [START_REF] Hofert | copula: Multivariate Dependence with Copulas. R package version 0[END_REF]) provides tools for exploring and modeling dependent data using copulas. The evd package [START_REF] Stephenson | evd: Functions for extreme value distributions[END_REF]) provides both block maxima and peak-over-threshold computations based on maximum likelihood estimation in the univariate and bivariate cases. The evdbayes package [START_REF] Stephenson | evdbayes: Bayesian Analysis in Extreme Value Theory[END_REF]) provides an extension of the evd package using bayesian statistical methods for univariate extreme value models. The package extRemes [START_REF] Gilleland | extRemes: Extreme Value Analysis. R package version 2.0-5[END_REF]) implements also univariate estimation of block maxima and peak-over-threshold by maximum likelihood estimation allowing non stationarity. The package evir [START_REF] Pfaff | evir: Extreme Values in R. R package version 1.7-3[END_REF]) is based on fitting a generalized Pareto distribution with the Hill estimator over a given threshold. The package lmom [START_REF] Hosking | lmom: L-moments. R package version 2.5[END_REF]) is dealing with Lmoments to estimate the parameters of extreme value distributions and quantile estimations for reliability or survival analysis. The package texmex [START_REF] Southworth | texmex: Statistical modelling of extreme values. R package version 2.1[END_REF]) provides statistical extreme value modeling of threshold excesses, maxima and multivariate extremes, including maximum likelihood and Bayesian estimation of parameters.

In contrast to previous described packages, the extremefit package provides tools for modeling heavy tail distributions without assuming a general parametric structure. The idea is to fit a parametric Pareto model to the tail of the unknown distribution over some threshold. The remaining part of the distribution is estimated nonparametrically and a data driven algorithm for choosing the threshold is proposed in Section 3.2. We also provide a version of this method for analyzing extreme values of a time series based on the nonparametric kernel function estimation approach. A data driven choice of the bandwidth parameter is given in Section 3.3. These estimators are studied in more details in [START_REF] Durrieu | Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles[END_REF].

Extreme value prediction using a semi-parametric model

Model and Estimator

We consider F t (x) = P (X ≤ x|T = t) the conditional distribution of a random variable X given a time covariate T = t, where x ∈ [x 0 , ∞) and t ∈ [0, T max ]. We observe independent random variables X t 1 , ..., X tn associated to a sequence of times 0 ≤ t 1 < ... < t n ≤ T max , such that for each t i , the random variable X t i has the distribution function F t i . The purpose of the extremefit package is to provide a pointwise estimation of the tail probability S t (x) = 1 -F t (x) and the extreme p-quantile F -1 t (p) processes for any t ∈ [0, T max ], given x > x 0 and p ∈ (0, 1). We assume that F t , are in the domain of attraction of the Fréchet distribution. The idea is to adjust, for some τ ≥ x 0 , the excess distribution function

F t,τ (x) = 1 - 1 -F t (x) 1 -F t (τ ) , x ∈ [τ, ∞) (1)
by a Pareto distribution:

G τ,θ (x) = 1 - x τ -1 θ , x ∈ [τ, ∞), (2)
where θ > 0 and τ ≥ x 0 an unknown threshold, depend on t. The justification of this approach is given by the Fisher-Tippett-Gnedenko theorem [START_REF] Beirlant | Statistics of Extremes: Theory and Applications[END_REF], Theorem 2.1) which states that F t , is in the domain of attraction of the Fréchet distribution if and only if 1 -F t,τ (τ x) → x -1/θ as τ → ∞. This consideration is based on the peak-over-threshold (POT) approach [START_REF] Beirlant | Statistics of Extremes: Theory and Applications[END_REF]). We consider the semi-parametric model defined by:

F t,τ,θ (x) = F t (x) if x ∈ [x 0 , τ ], 1 -(1 -F t (τ )) (1 -G τ,θ (x)) if x > τ, ( 3
)
where τ ≥ x 0 is the threshold parameter. We propose in the sequel to estimate F t and θ which are unknown in (3).

The estimator of F t (x) is taken as the weighted empirical distribution given by

F t,h (x) = 1 n j=1 W t,h (t j ) n i=1 W t,h (t i )1 {Xt i ≤x} , (4)
where, for i = 1, . . . , n, W t,h (t i ) = K t i -t h are the weights and K(.) is a kernel function assumed to be continuous, non-negative, symmetric with support on the real line such that K(x) ≤ 1, and h > 0 is a bandwidth.

By maximizing the weighted quasi-log-likelihood function (see [START_REF] Durrieu | Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles[END_REF], [START_REF] Staniswalis | The kernel estimate of a regression function in likelihood-based models[END_REF] and [START_REF] Loader | Local regression and likelihood[END_REF])

L t,h (τ, θ) = n i=1 W t,h (t i ) log dF t,τ,θ dx (X t i ) (5)
with respect to θ, we obtain the estimator

θ t,h,τ = 1 n t,h,τ n i=1 W t,h (t i )1 {Xt i >τ } log X t i τ , ( 6
)
where

n t,h,τ = n i=1 W t,h (t i )1 {Xt i >τ }
is the weighted number of observations over the threshold τ .

Plug-in ( 4) and ( 6) in the semi-parametric model (3), we obtain:

F t,h,τ (x) =    F t,h (x) if x ∈ [x 0 , τ ], 1 -1 -F t,h (τ ) 1 -G τ, θ t,h,τ (x) if x > τ. ( 7
)
For any p ∈ (0, 1), the estimator of the p-quantile of X t is defined by

q p (t, h) =    F -1 t,h (p) if p < p τ , τ 1-pτ 1-p θ t,h,τ otherwise, (8)
where p τ = F t,h (τ ).

Selection of the Threshold

The determination of the threshold τ in model ( 3) is based on a testing procedure which is a goodness-of-fit test for the parametric-based part of the model. At each step of the procedure, the tail adjustment to a Pareto distribution is tested based on k upper statistics. If it is not rejected, the number k of upper statistics is increased and the tail adjustment is tested again until it is rejected. If the test rejects the parametric tail fit from the very beginning, the Pareto tail adjustment is not significant. On the other hand, if all the tests accept the parametric Pareto fit then the underlying distribution is significantly Pareto. The critical value denoted by D depends on the kernel choice and is determined by Monte-Carlo simulation, using the CriticalValue function of the package.

In Table 1, we display the critical values obtained for several kernel functions using Criti-calValue.

In our package, the Gaussian kernel with standard deviation 1/3 is approximated by the truncated Gaussian kernel 1 √ 2πσ expx 2 2σ 2 1 |x|≤1 with σ = 1/3. The default values of the parameters in the algorithm yield satisfying estimation results on simulation study without being time-consuming even for large data sets. The choice of these tuning parameters is given in [START_REF] Durrieu | Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles[END_REF].

The following commands compute the critical value D for the truncated Gaussian kernel with σ = 1 (default value) and display the empirical distribution function of the goodness-of-fit test statistic which determines the threshold τ .

(1 -x 2 ) 2 1 |x|≤1 Epanechnikov 6.1 3 4 (1 -x 2 )1 |x|≤1 Rectangular 10.0 1 |x|≤1 Triangular 6.9 (1 -|x|)1 |x|≤1 Truncated Gaussian, σ = 1/3 8.3 3 √ 2π exp(-(3x) 2 2 )1 |x|≤1 Truncated Gaussian, σ = 1 3.4 1 √ 2π exp -x 2 2 1 |x|≤1
R> library(extremefit) R> n <-1000 #Define the sample size R> NMC <-500 #Define the number of Monte-Carlo simulated samples R> CriticalValue(NMC, n, TruncGauss.kernel, prob = 0.99, plot = TRUE)

[1] 3.432665 For a given t, the function hill.adapt allows a data-driven choice of the threshold τ and the estimation of θ t .

Selection of the bandwidth h

We determine the bandwidth h by cross-validation from a sequence of the form

h l = aq l , l = 0, . . . , M h with q = exp log b-log a M h
, where a is the minimum bandwidth of the sequence, extremefit: An R Package for Extreme Quantiles b is the maximum bandwidth of the sequence and M h is the length of the sequence. The choice is performed globally on the grid

T grid = {t 1 , . . . , t K } of points t i ∈ [0, T max ],
where the number K of the points on the grid is defined by the user. The choice K = n is possible but can be time consuming for large samples. We recommend to use a fraction of n.

We choose h cv by minimizing in h m , m = 1, . . . , M h the cross-validation function

CV (h m , p cv ) = 1 M h card(T grid ) h l t i ∈T grid log q (-i) pcv (t i , h m ) F -1 t i ,h l (p cv ) , ( 9
)
where F -1 t i ,h l (p cv ) is the empirical quantile from the observations in the window [t i -h l , t i +h l ], q 8) with the observation X t i removed and τ being the adaptive threshold given by the remaining observations inside the window [t i -h m , t i + h m ]. The function bandwidth.CV selects the bandwidth h by cross-validation.

(-i) pcv (t i , h m ) is the quantile estimator inside the window [t i -h m , t i + h m ] defined by (

Package presentation on simulation study

The extremefit package is written in R, (R Development Core Team ( 2016)). In this section, we demonstrate the package using its application on two simulated data sets.

The following code displays the computation of the survival probabilities and quantiles using the adaptive choice of the threshold provided by the hill.adapt function.

R> library(extremefit) R> set.seed(5) R> X <-abs(rcauchy(200)) R> n <-100 R> HA <-hill.adapt(X) R> predict(HA, newdata = c(3, 5, 7), type = "survival")$p R> predict(HA, newdata = c(0.9, 0.99, 0.999, 0.9999), type = "quantile")$y A simple use of the method described in Section 3 is given by the following example. With t i = i/n, we consider data X t 1 , . . . , X tn generated by the Pareto change-point model defined by

F t (x) = 1 -x -1/2θt 1 x≤τ + 1 -x -1/θt τ 1/2θt 1 x>τ , ( 10
)
where θ t is a time varying parameter depending on t ∈ [0, 1] defined by θ t = 0.5+0.25 sin(2πt) and τ = 3 as described in [START_REF] Durrieu | Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles[END_REF]. We consider the sample size n = 50000. The following commands generate one sample from the model (10).

R> library(extremefit) R> set.seed(5) R> n <-50000 ; tau <-3 R> theta <-function(t){0.5+0.25*sin(2*pi*t)} R> T <-1:n/n; Theta <-theta(T); X <-NULL R> for(i in 1 For each t ∈ T grid , we determine the data-driven threshold τ and the estimates θ t,hcv,τ using the function hill.ts. R> Tgrid <-seq(0, 1, 0.01) R> hillTs <-hill.ts(X, T, Tgrid, h = Hcv$h.cv, + kernel = TruncGauss.kernel, CritVal = 3.4)

:n){ R> X[i] <-rparetoCP(1, a0 = 1/(Theta[i]*2), a1 = 1/Theta[i], x1=tau) R> }
For each t ∈ T grid , we display θ t,hcv,τ and the true value θ t = 0.5 + 0.25 sin(2πt) in Figure 2.

R> plot(Tgrid, hillTs$Theta) R> lines(T, Theta, col = "red")

The estimates of the quantiles and the survival probabilities are determined using the predict.hill.ts function. For instance the estimate of the p-quantile F -1 t (p) of order p = 0.99 and p = 0.999 are computed with the following R command: R> PredQuant <-predict(hillTs, newdata = c(0.99, 0.999), type = "quantile") t (p) with p = 0.99 (black line) and p = 0.999 (red line) and the corresponding estimated quantiles with p = 0.99 (black dots) and p = 0.999 (black cross) as function of t ∈ T grid .

In the same way, we estimate for each t ∈ T grid the survival probabilities S t (x) = 1 -F t (x). The function predict.hill.ts with the option type = "survival" computes the estimated survival function for a given x. For each t ∈ T grid , the following commands compute the estimate of S t (x) for x = 20 and x = 30. Figure 5: Boxplots of the log q 0.99 (t, h cv ) adaptive estimators with bandwidth h cv chosen by cross-validation and t ∈ T grid . The true log 0.99-quantile is plotted as a red line.

R>

Real-world data sets

Wind data

The study of wind speed is important for the renewable energy problem in present time.

Many considers wind as a free and environmentally source of energy. The implementation of wind farm throughout the world shows an encouraging and promising energy option. Studies of wind speed in extreme value theory were made to model windstorm losses or detect areas which can be subject to hurricanes (see [START_REF] Rootzén | Extreme value statistics and wind storm losses: a case study[END_REF] and [START_REF] Simiu | Extreme wind distribution tails: a peaks over threshold approach[END_REF]).

The wind data in the package extremefit comes from Airport of Brest (France) and represents the average wind speed per day from 1976 to 2005. The data set is included in the package extremefit and can be loaded by the following code.

R> library(extremefit) R> data("dataWind") R> attach(dataWind)

The commands below illustrate the function hill.adapt on the wind data set and computes a monthly estimation of the survival probabilities 1 -F t,h,τ (x) for a given x = 100 km/h with the function predict.hill.adapt.

Sea shores water quality

The study of the pollution in the aquatic environment is an important problem to have it protected. Humans tend to pollute the environment through their activities and the water quality survey is necessary. The bivalve's activity is investigated by modeling the valve movements using high frequency valvometry. The electronic equipment is described in [START_REF] Tran | Estimation of potential and limits of bivalve closure response to detect contaminants: application to cadmium[END_REF] and modified by Chambon, Legeay, [START_REF] Chambon | Influence of the parasite worm Polydora sp. on the behaviour of the oyster crassostrea gigas: a study of the respiratory impact and associated oxidative stress[END_REF]. More information can be found in http://molluscan-eye.epoc.u-bordeaux1.fr/.

High-frequency data (10 Hz) are produced by noninvasive valvometric techniques and the study of the bivalve's behavior in their natural habitat leads to the proposal of several statistical models (Sow, Durrieu, andBriollais (2011), Schmitt, De Rosa, Durrieu, Sow, Ciret, Tran, and[START_REF] Schmitt | Statistical study of bivalve high frequency microclosing behavior: scaling properties and shot noise modeling[END_REF], [START_REF] Jou | A dynamic artificial clam (Corbicula fluminea) allows parcimony on-line measurement of waterborne metals[END_REF], [START_REF] Coudret | Comparison of kernel density estimators with assumption on number of modes[END_REF], [START_REF] Azaïs | A hidden renewal model for monitoring aquatic systems biosensors[END_REF], [START_REF] Durrieu | Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles[END_REF] and Durrieu, Pham, Foltête, Maxime, Grama, Le Tilly, Duval, Tricot, Naceur, and Sire ( 2016)). It is observed that in the presence of a pollutant, the activity of the bivalves is modified and consequently they can be used as bioindicators to detect perturbations in aquatic systems (pollutions, global warming). A group of oysters Crassostrea gigas of the same age are installed around the world but we concentrate on the Locmariaquer site (GPS coordinates 47 • 34 N, 2 • 56 W) in France. The oysters are placed in a traditional oyster bag. In the package extremefit, we provide a sample of the measurements for one oyster over one day. The data can be accessed by R> library(extremefit) R> data("dataOyster")

The description of the data can be found with the R command help(dataOyster). The following code covers the velocities and the time covariate and also displays the data.

R> Velocity <-dataOyster$data[, 3] R> time <-dataOyster$data[, 1] R> plot(time, Velocity, type = "l", xlab = "time (hour)", + ylab = "Velocity (mm/s)")

We observe in Figure 7 that the velocity is equal to zero in two periods of time. To facilitate the study of these data, we have included a time grid where the intervals with null velocities are removed. The grid of time can be accessed by dataOyster$Tgrid. We shift the data to be positive.

R> #grid for which the velocities are different from 0 R> new.Tgrid <-dataOyster$Tgrid R> #We shift the data to be positive R> X <-Velocity + (-min(Velocity))

The bandwidth parameter is selected by cross-validation method (h cv = 0.2981812) using bandwidth.CV but we select it manually in the following command due to long computation time. The estimations of the extreme quantile of order 0.999 and the probabilities of rare events are computed as described in Section 3.2. The critical value of the sequential test is D = 3.4 when considering a truncated Gaussian kernel, see Table (1). A global study on a set of 16 oysters on a 6 months period is given in [START_REF] Durrieu | Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles[END_REF].

R> pred.quant.Oyster <-predict(TS.Oyster, newdata = 0.999, type = "quantile") R> plot(time, Velocity, type = "l", ylim = c(-0.5, 1), + xlab ="Time (hour)", ylab = "Velocity (mm/s)") R> quant0.999 <-rep(0, length(seq(0, 24, 0.05))) R> quant0.999[match(new.Tgrid, seq(0, 24, 0.05))] <-+ as.numeric(pred.quant.Oyster$y) -+ (-min(Velocity)) R> lines(seq(0, 24, 0.05), quant0.999, col = "red")

In [START_REF] Durrieu | Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles[END_REF] and [START_REF] Durrieu | Dynamic extreme values modeling and monitoring by means of sea shores water quality biomarkers and valvometry[END_REF], we observe that valvometry using extreme value theory allows in real-time in situ analysis of the bivalves behavior and appears as an effective early warning tool in ecological risk assessment and marine environment monitoring.

Electric consumption

The study of the electric consumption is an important challenge due to the expansion of the human population that increases the need of electricity. Multiple models have been used to forecast the electric consumption, as regression and time series models [START_REF] Bianco | Electricity consumption forecasting in Italy using linear regression models[END_REF] and [START_REF] Ranjan | Modelling of electrical energy consumption in Delhi[END_REF], [START_REF] Harris | Dynamic structural analysis and forecasting of residential electricity consumption[END_REF] and [START_REF] Bercu | A SARIMAX coupled modelling applied to individual load curves intraday forecasting[END_REF]). [START_REF] Durand | Analyse de courbes de consommation électrique par chaînes de Markov cachées[END_REF] used hidden Markov model to forecast the electric consumption. A research project conducted in France (Lorient, GPS coordinates 47 • 45 N, 3 • 22 W) concerns the measurements of electric consumption using Linky, a smart communicating electric meter (http://www.enedis.fr/linky-communicating-meter). Installed in end-consumer's habitations and linked to a supervision center, this meter is in constant interaction with the network. The Linky electric meter allows a measurement of the electric consumption every 10 minutes.

To prevent from major power outages, the SOLENN project (http://www.smartgrid-solenn. fr/en/) is testing an alternative to load shedding. Data of electric consumption are collected on selected habitations to study the effect of a decrease on the maximal power limit. For example, an habitation with a maximal electric power contract of 9 kiloVolt ampere is decreased to 6 kiloVolt ampere. This experiment enables to study the consumption of the habitation with the application of an electric constraint related to the need of the network. For instance, after an incident such as a power outage on the electric network, the objective is to limit the number of habitations without electricity. If during the time period where the electric constraint is applied, the electric consumption of the habitation exceeds the restricted maximal power, the breaker cuts off and the habitation has no more electricity. The consumer can, at that time, close the circuit breaker and gets the electricity back. In any cases, at the end of the electric constraint, the network manager can close the breaker using the Linky electric meter which is connected to the network. The control of the cut off breakers is crucial to prevent a dissatisfaction from the customers and to detect which habitations are at risk. The extreme value modeling approach described in Section 3 was carried out on the electric consumption data for one habitation from the 24th December 2015 to the 29th June 2016. This data are accessible on the extremefit package and Figure 9 We observe in April 2016 missing values in Figure 9 due to a technical problem. We modify the grid of time by removing the intervals of T grid with no data.

R> new.Tgrid <-LoadCurve$Tgrid

We choose the truncated Gaussian kernel and the associated critical value of the goodnessof-fit test is D = 3.4 (see Table 1). The bandwidth parameter is selected by cross-validation method (h cv = 3.44) using bandwidth.CV but we select it manually in the following command due to long computation time.

R> HH <-hill.ts(LoadCurve$data$Value, LoadCurve$data$Time, new.Tgrid, + h = 3.44, kernel = TruncGauss.kernel, CritVal = 3.4)

To detect the probability to cut off the breaker, we compute for each time in the grid the estimates of the probability to exceed the maximal power of 9kVA and of the extreme 0.99quantile. Figure 10 displays the electric consumption during the period of study and the estimated quantile of order 0.99. The plus symbol appear at the times when the maximal power was decreased corresponding to the 11th, 13th, 18th of January, the 25th of February and the 1st, 7th, 18th of March in 2016, with a respectively decrease to 6.3, 4.5, 4.5, 4.5, 3.6, 2.7 and 2.7 kVA. Figure 11 displays the estimated survival probability which depends on the time and the maximal power. We can observe that the survival probability is higher than usual during this period. Furthermore, we have the auxiliary information that this habitation cuts off its breaker on every electric constraint period except the 11th of January, 2016.

Using prediction method coupled with the method implemented in the package extremefit, it will be possible to detect high probability of cutting off a breaker and react accordingly.

Conclusion

This paper focus on the functions contained in the package extremefit to estimate extreme quantiles and probabilities of rare events. The package extremefit works also well on large data set and the performance was illustrated on simulated data and on real data sets.

The choice of the pointwise data driven threshold allows a flexible estimation of the extreme quantiles. The diffusion of the use of this method for the scientific community will improve the choice of estimation of the extreme quantiles and probability of rare events using the peak-over-threshold approach.

Figure 1 :

 1 Figure 1: Empirical distribution function of the test statistic for the truncated Gaussian kernel with N M C = 1000 Monte-Carlo samples of size n = 500. The vertical dashed line represents the critical value (D = 3.4) corresponding to the 0.99-empirical quantile of the test statistic.

Figure 2 :

 2 Figure 2: Plot of the θ t estimate θ t,hcv,τ (black dots) and the true θ t (red line) for each t ∈ T grid .

Figure 3

 3 Figure3displays the true and the estimated quantiles of order p = 0.99 and p = 0.999 of the Pareto change-point distribution defined by (10). The true quantiles can be accessed by the qparetoCP function.

Figure 4 :

 4 Figure 4: Plot of the true survival probabilities S t (x) at x = 20 (black line) and x = 30 (red line) and the corresponding estimated survival probabilities at x = 20 (black dots) and x = 30 (black cross) as function of t ∈ T grid .

  Figure 6: Plot of the estimated survival probability 1 -F t,h,τ (x) at x = 100 km/h.

Figure 7 :

 7 Figure 7: Plot of the velocity of the valve closing and opening over one day.

Figure 8 :

 8 Figure 8: Plot of the estimated 0.999-quantile (red line) and the velocities of valve closing (black lines).

Figure 9 :

 9 Figure 9: Electric consumption of one customer from the 24th December 2015 to the 29th June 2016.We consider the following grid of time T grid :

R>

  Figure 10: Plot of the estimated 0.99-quantile (red line) for each time from the 24th December 2015 to the 29th June 2016.

Figure 11 :

 11 Figure 11: Plot of the estimated survival probability depending on the time and the maximal power. The plus symbol correspond to the electric constraint period.

Table 1 :

 1 Critical values associated to kernel functions

	Kernel	D	K(x)
	Biweight	7	15 16

Acknowledgements

This work was supported by the ASPEET Grant from the Université Bretagne Sud and the Centre National de la Recherche Scientifique. Kevin Jaunatre would like to acknowledge the financial support of the SOLENN project.

Affiliation:

Gilles Durrieu, Ion Grama, Kevin Jaunatre, Jean-Marie Tricot Laboratoire de Mathématiques de Bretagne Atlantique Université de Bretagne Sud and UMR CNRS 6205 Campus de Tohannic, BP573, 56000 Vannes, France Email : gilles.durrieu@univ-ubs.fr, ion.grama@univ-ubs.fr, kevin.jaunatre@univ-ubs.fr, jean-marie.tricot@univ-ubs.fr Quang-Khoai Pham Department of Mathematics Forestry University of Hanoi Hanoi, Vietnam Email : quangkhoaihd@gmail.com