FuncDetectPointOutlierLocFit.Rd
function to model each curve of a dataset using a local regression
FuncDetectPointOutlierLocFit(datain, myparam, mytime, myid, mylevel, mylocfit)
datain | input dataframe. This dataframe contains a set of time courses |
---|---|
myparam | character, name of the variable to model in datain (for example, Biomass, PH or LA and so on) |
mytime | character, name of the time variable in datain which must be numeric |
myid | character, name of the id variable in datain |
mylevel | numeric, factor to calculate the confidence interval |
mylocfit | numeric, The constant component of the smoothing parameter. (see the locfit()) |
a data.frame with outlier containing the following columns:
the id variable
name of the time variable in datain
name of the modeled variable in datain
the locfit prediction
standard deviation of the prediction
lower bound of the confidence interval
upper bound of the confidence interval
flag of detected outlier (0 is outlier, 1 is not)
see locfit() help function from the locfit R library The user can act on:
the constant of the smoothing parameter. Increase mylocfit to have a very smooth curve
the level to calculate the confidence interval. Increase mylevel to exclude less outliers
to produce the grahics of the prediction and detected outliers, please use plotDetectPointOutlierLocFit() function.
#>selec<-c("manip1_1_1_WW","manip1_1_2_WW","manip1_1_3_WW", "manip1_1_4_WW","manip1_1_5_WW") mydata<-plant1[plant1[,"Ref"] %in% selec,] resu<-FuncDetectPointOutlierLocFit(datain=mydata, myparam="biovolume",mytime="thermalTime", myid="Ref",mylevel=5,mylocfit=70) # }