Articles

Affichage des articles du mars, 2018

Quadratic polynomials in glm and confidence interval of extremum

It is frequent that a variable is modeled using quadratic equation in glm if we suspect that there is a minimum or maximum. However it is less easy to characterize where is located the extremum. One solution is given here but it does not allow to direct fit the data: Stimson JA, Carmines EG, Zeller RA (1978) Interpreting polynomial regression. Sociological Methods & Research 6 (4):515-615 Let do an example: First generate some data: xobs <- 1:100 # If a2 positive, the parabole has a minimum # If a2 negative, the parabole has a maximum # The value of a2 is related to the curvature at the point x=b a2 <- 0.1 # The b value is the position of the maximum or minimum b <- 40 # The c value is a shift parameter. The "0" will be at c ! c <- 100 yobs <- a2*(xobs-b)^2+c plot(xobs, yobs, ylim=c(0, 400), type="l", bty="n", las=1) This second order equation is not of the classical form a2*x^2+a1*x+a0 and thus it

To setup locale in ubuntu

In terminal: locale shows the locale currently used by your system locale -a  shows the locale present in your system If one is missing, use : sudo locale-gen fr_FR.UTF-8 and then  sudo update-locale LANG=fr_FR.UTF-8 to define this as a default The defaults are available here: cat /etc/default/locale  You can setup any of the following: LANG=fr_FR.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC="fr_FR.UTF-8" LC_TIME="fr_FR.UTF-8" LC_COLLATE="fr_FR.UTF-8" LC_MONETARY="fr_FR.UTF-8" LC_MESSAGES="fr_FR.UTF-8" LC_PAPER="fr_FR.UTF-8" LC_NAME="fr_FR.UTF-8" LC_ADDRESS="fr_FR.UTF-8" LC_TELEPHONE="fr_FR.UTF-8" LC_MEASUREMENT="fr_FR.UTF-8" LC_IDENTIFICATION="fr_FR.UTF-8" LC_ALL= And now you can run  system("ssh login@ipv4.ipv4.ipv4.ipv4 \"R -e 'print(1)'\"")  without warning ! In R: > Sys.ge