[R] Drawing the regression line and the 95% confidence intervals

2015-05-05 Thread varin sacha
Hi, Dear R-helpers, Here below you will find a reproducible fictitious example working except the "abline" function. First thing : I try to draw the regression line (multiple linear regression). I try the "abline" function but it does not work. I don't get any error message but the straight li

Re: [R] Drawing the regression line and the 95% confidence intervals

2015-05-06 Thread varin sacha
diction") Many thanks once more for your help. Sacha - Mail original - De : Jim Lemon À : varin sacha Cc : R-help Mailing List Envoyé le : Mercredi 6 mai 2015 1h02 Objet : Re: [R] Drawing the regression line and the 95% confidence intervals Hi Sacha, The line you have requested

Re: [R] Drawing the regression line and the 95% confidence intervals

2015-05-06 Thread varin sacha
Brian, thanks for the precisions. David, many thanks for your code that perfectly works.  Best, Sacha De : David L Carlson À : "Cade, Brian" ; varin sacha Cc : R-help Mailing List Envoyé le : Mercredi 6 mai 2015 21h52 Objet : RE: [R] Drawing the regression line and the 95%

[R] Nagelkerke Pseudo R-squared

2015-07-17 Thread varin sacha
Dear R-Experts, I have fitted an ordinal logistic regression with just 1 explanatory variable for the reproducible example here below. Everything is working, now I try to calculate the Nagelkerke Pseudo R-squared. I have found a package BaylorEdPsych providing many Pseudo R-squared, but the ex

Re: [R] Nagelkerke Pseudo R-squared

2015-07-18 Thread varin sacha
Thanks David for your response. Best regards, SV - Mail original - De : David Winsemius À : varin sacha Cc : R-help Mailing List Envoyé le : Samedi 18 juillet 2015 3h33 Objet : Re: [R] Nagelkerke Pseudo R-squared On Jul 17, 2015, at 4:33 PM, varin sacha wrote: > Dear R-Expe

Re: [R] Nagelkerke Pseudo R-squared

2015-07-18 Thread varin sacha
Thanks Frank for your response. I have used the rms package. Reproducible example here below : install.packages("rms") library(rms) a=c("tres grand", "grand", "petit","petit","tres grand","grand","petit","petit","tres grand","grand") b=c("homme", "homme", "femme", "femme", "femme", "homme",

[R] Confidence intervals of G&K gamma statistics using bootstrap

2015-07-23 Thread varin sacha
Dear R-Experts, I am trying to calculate the confidence intervals of the Goodman & Kruskal gamma statistics using bootstrap. There is no gamma function in the boot package. There is a gamma function in the base package, but it is the usual mathematical function. So, I decide to try to calcula

[R] Bootstrapped CIs of R-squared for ordinal regression

2015-08-10 Thread varin sacha
Dear R-Experts, I am trying to get the bootstrapped confidence intervals of R-squared (Nagelkerke) for an ordinal logistic regression. Something is going wrong at the end of my script. Many thanks for your help. Here is my reproducible example. install.packages("rms") library(rms) x=c(1,2,3,2

[R] Bca confidence intervals for Pearson coefficient, thanks.

2014-12-20 Thread varin sacha
Hi to everyone, I am trying to calculate the Bca bootstrap confidence intervals for the Pearson coefficient. x=Dataset$math.testy=Dataset$geo.testcor(x,y,method="pearson")[1] 0.6983799 boot.ci(cor, conf=0.95, type=bca)Erreur dans boot.out$t0 : objet de type 'closure' non indiçable I have tried a

Re: [R] Bca confidence intervals for Pearson coefficient, thanks.

2014-12-21 Thread varin sacha
ab)       >                   [1] 0.1490712                            ## Eta.square > library(lsr)> test.aov = aov(math.test ~ gender, data = test) > etaSquared(test.aov)          eta.sq eta.sq.partgender 0.1207154   0.1207154 Best Regards, looking forward to reading you once more, S

Re: [R] Bca confidence intervals for Pearson coefficient, thanks.

2014-12-23 Thread varin sacha
Dear Professor Fox, Once more I really thank you lots for your response. I will try it. Best regards, and Merry Christmas to you. SV De : John Fox À : 'varin sacha' Cc : 'r-help help' Envoyé le : Dimanche 21 décembre 2014 22h22 Objet : RE: [R] Bca confidence i

[R] Color problem for 2 simple graphs

2015-01-08 Thread varin sacha
Hi R-experts, Basic questions (sorry for that) but after many attempts I don't get it. So in case of you might have time to give me some responses, would be highly appreciated. Two simple graphs (barplots and boxplots). Everything is going fine but I would like to have my 2 bars (male and female

[R] Bootstrap library(boot) "boot.ci" function

2015-01-17 Thread varin sacha
Hi dear R-experts, I want to compare the bootstrap percentile interval, the Z interval, the T interval, etc.So I use a function (I have modified a few things) I have found on stats.stackexchange. simfun <- function(n=20) {x <- rnorm(n)m.x <- mean(x)s.x <- sd(x)z <- m.x/(1/sqrt(n))t <- m.x/(s.x/s

[R] library(Rcmdr) sh: otool: command not found

2015-02-10 Thread varin sacha
Hi R experts, I have just updated R and RStudio. I am running OS X 10.6.8 R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin10.8.0 (64-bit) RStudio Version 0.98.1102 – © 2009-2014 RStudio, Inc. Mozilla/5.0

Re: [R] library(Rcmdr) sh: otool: command not found

2015-02-11 Thread varin sacha
Dear John, Dear Dan, Many thanks for your response. It works perfectly. Best, - Mail original - De : John Fox À : 'varin sacha' Cc : "'r-help@R-project.org'" Envoyé le : Mercredi 11 février 2015 3h12 Objet : RE: [R] library(Rcmdr) sh: otool: comma

[R] Density plots for Chi-square and F-distribution on my data

2015-02-19 Thread varin sacha
Dear R-helpers, I want to compute the density plot (probability plot) of the Chi-square distribution. My 2 categorical variables are gender (male, female) and colors of the eyes (blue, green and brown). The sample size n = 100. The proportions are the following : male and blue eyes : 10% male

Re: [R] Density plots for Chi-square and F-distribution on my data

2015-02-19 Thread varin sacha
Arg, just been caught ! No, just joking, it is a long time I don't have homework anymore. I keep on giving myself homeworks life long yes this is true. Anyways thanks for your response. Best, - Mail original - De : Bert Gunter À : varin sacha Cc : "r-help@r-project.org&q

[R] Drawing/Plotting Cramer's V and Eta-square distribution

2015-03-11 Thread varin sacha
Hi R-Experts, Thanks to the R package "SuppDists", I can draw/plot the sampling distribution of the Pearson (and/or Spearman) rho coefficient. install.packages("SuppDists") library(SuppDists) curve(dPearson(x,85,rho=0.64),from=-1,to=1) Do you know a package (or some packages) I could use if I w

[R] Add the Gauss curve on histogram

2015-03-16 Thread varin sacha
Dear R-Experts, I can easily plot an histogram and its density curve. But when I try to add the Gauss curve on the histogram with the following Rcode here below, I don't get it. What is wrong ? Or what is missing in my code ? ##Plot an histogram h=hist(newdata$math.test, prob=TRUE, col="blue",

Re: [R] Add the Gauss curve on histogram

2015-03-17 Thread varin sacha
ab="Note test math", ylab="Densité", main="Test math") x <- seq(from = min(newdata$math.test, na.rm=TRUE), to = max(newdata$math.test, na.rm=TRUE, length=100)) lines(x, dnorm(x, mean(newdata$math.test, na.rm = TRUE), sd(newdata$math.test, na.rm = TRUE)))

Re: [R] Add the Gauss curve on histogram

2015-03-17 Thread varin sacha
Sorry for that Rolf, Yes, it perfectly works. Many thanks. Cheers, - Mail original - De : Rolf Turner À : varin sacha Cc : R help Envoyé le : Mardi 17 mars 2015 12h40 Objet : Re: [R] Add the Gauss curve on histogram Please keep your replies on-list. I am not your private

[R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread varin sacha
Dear R-Experts, I try to superimpose/present 2 curves/plots on the same graph. I would like the result/graph to be readable. For that, I use the par(new=TRUE) argument but on the Y-axis there is a superposition of writings and the Y-axis becomes unreadable. How can I solve this problem ? Here i

Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread varin sacha
Dear all, Excellent, many thanks for everything. Best,S De : Boris Steipe À : Clint Bowman Cc : varin sacha ; "r-help@r-project.org" Envoyé le : Lundi 23 mars 2015 19h32 Objet : Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE) ... and that gives you

Re: [R] WEIBULL or EXPONENTIAL?

2015-04-03 Thread varin sacha
Hi Xavier, I use the fitdistrplus and logspline packages to know which distribution fits better my data. Here is an example : install.packages("fitdistrplus") library(fitdistrplus) instal.packages("logspline") library(logspline) x=c(44986,18288,56147,44488,41018,40631,27301,39025,45688,47172,1

Re: [R] BIG difficulties in Using boot.ci (bot package)

2015-04-13 Thread varin sacha
Hi Jean, Many thanks, I got it but there is still a problem. When trying to bootstrap the confidence intervals, I get these messages. boot.ci(results,type="bca",index=1) [1] "All values of t are equal to 5.75620151906917 \n Cannot calculate confidence intervals" NULL > boot.ci(results,type

Re: [R] BIG difficulties in Using boot.ci (bot package)

2015-04-13 Thread varin sacha
uot;bca",index=1) boot.ci(results,type="bca",index=2) boot.ci(results,type="bca",index=3) How is it possible to avoid that warning ? Best, S - Mail original - De : Michael Dewey À : varin sacha ; "Adams, Jean" Cc : "r-help@r-project.org"

Re: [R] BIG difficulties in Using boot.ci (bot package)

2015-04-13 Thread varin sacha
e : Lundi 13 avril 2015 19h26 Objet : Re: [R] BIG difficulties in Using boot.ci (bot package) On 4/13/2015 9:06 AM, varin sacha wrote: > Hi Michael, > > Thanks for your response. About the data frame not necessary. I correct the > code according to your comments. I still get the following war

[R] R packages for power analysis

2014-08-28 Thread varin sacha
Dear all, I do know very well the pwr packages from St�phane Champely.� I would have known if somebody knows others packages for power analysis ?� I think here more about the calculation of the power analysis of the nonparametric tests like the mann whitney or the kruskall wallis. Best Regards,

Re: [R] Problem with downloading library(Rcmdr)

2016-11-07 Thread varin sacha
David, Jeff, Many thanks, I have installed an older version of R and rmle packages works. Best De : David Winsemius À : Jeff Newmiller oject.org> Envoyé le : Dimanche 6 novembre 2016 16h35 Objet : Re: [R] Problem with downloading library(Rcmdr) > On

[R] Save a generated .txt (or .csv) file on the desktop

2017-01-30 Thread varin sacha
Dear R-Experts, I have generated a data.frame. Now I would like to get it (the generated data.frame) saved on my desktop (desktop of my computer) in a .csv or .txt file. How can I proceed ? Many thanks. Here is the reproducible example : # Génération aléatoire des colonnes Individu<-1:50 Ge

[R] error using polymars argument

2014-05-01 Thread varin sacha
Hi Dear all, I got an error when I try to do a MARS regression with the "polymars" argument on the A matrix and the V vector here below. I don't understand the error, I have nrow=22 for the response variable and for the predictor matrix. So if somebody could tell me what is going wrong, it would

Re: [R] error using polymars argument

2014-05-01 Thread varin sacha
Hi Jim, Many thanks. Sorry for disturbing just for a parenthesis... But I couldn't go ahead... Le Jeudi 1 mai 2014 23h22, Jim Lemon a écrit : On 05/01/2014 09:47 PM, varin sacha wrote: > Hi Dear all, > I got an error when I try to do a MARS regression with the "polymars"

[R] Bootstrapping the prediction intervals for regression

2014-05-15 Thread varin sacha
Dear experts, > > >I have done a multiple linear regression on a small sample size (n=22). >I have computed the prediction intervals (not the confidence intervals). > > >Now I am trying to bootstrap the prediction intervals. > > >I didn't find any package doing that. >So I decide to create my own R

Re: [R] Bootstrapping the prediction intervals for regression

2014-05-15 Thread varin sacha
= dat[s, ])     result[,,i] <- predict(lm.tmp, interval = "prediction") } Then you can do whatever you want with 'result', including computing the min and max values. Hope this helps, Rui Barradas Em 15-05-2014 10:37, varin sacha escreveu: > Dear experts, >

Re: [R] Bootstrapping the prediction intervals for regression

2014-05-15 Thread varin sacha
lm.tmp <- lm(y ~ x1 + x2, data = dat[s, ]) >        result[,,i] <- predict(lm.tmp, interval = "prediction") > } > > > Then you can do whatever you want with 'result', including computing the min > and max values. > > > Hope this helps, > &g

[R] Hi everybody, your help would be very appreciate, thanks !

2014-02-22 Thread varin sacha
Hi everybody, I have realized a multiple linear regression.  To know how well my model does in terms of prediction, I can compute prediction intervals bands and decide if they are narrow enough to be of use. If they are too wide, then they probably are not useful. Using R, I have written these

[R] plot out the predicted values and the upper and lower limits

2014-02-25 Thread varin sacha
Hi, I have realized a multiple linear regression.  To know how well my model does in terms of prediction, I can compute prediction intervals bands and decide if they are narrow enough to be of use. If they are too wide, then they probably are not useful. So what I am trying to do is : Theoretica

Re: [R] plot out the predicted values and the upper and lower limits

2014-02-26 Thread varin sacha
se")) One problem remains : If I want to plot out (in a same graph) the predicted values as well as the upper and lower limits of the prediction intervals for those values. How can I do, many thanks once more. Best, Le Mercredi 26 février 2014 4h59, varin sacha a écrit : Hi, I have rea

[R] Downloading a RData file and problem with loading it

2014-03-13 Thread varin sacha
Hi all, I have downloaded the file 5.R.RData and I am trying to load it into R using load("5.R.RData")  But it doesn't work.What's wrong, Many thanks  [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.c

[R] Add a vertical line and some values on a plot

2017-10-22 Thread varin sacha via R-help
Dear R-experts, Here below is my code, I would like to add a vertical line on my plot, showing the median and I would like to place some values on this graph as well, i.e. 4.3 and -8.4. How can I do ? Many thanks for your reply. A=c(1,2.3,4,3.5,4.3,2.5,6.3,-0.1,-1.5,3.7,-2.3,-3.5,5.4,3.2, -1

Re: [R] Add a vertical line and some values on a plot

2017-10-29 Thread varin sacha via R-help
lot points, see, well, ?points(). Hope this helps, Rui Barradas Em 22-10-2017 16:33, varin sacha via R-help escreveu: > Dear R-experts, > > Here below is my code, > I would like to add a vertical line on my plot, showing the median and I > would like to place some values on this graph

[R] Confidence intervals around the MIC (Maximal information coefficient)

2017-12-10 Thread varin sacha via R-help
Dear R-Experts, Here below is my R code (reproducible example) to calculate the confidence intervals around the spearman coefficient. ## C=c(2,4,5,6,3,4,5,7,8,7,6,5,6,7,7,8,5,4,3,2) D=c(3,5,4,6,7,2,3,1,2,4,5,4,6,4,5,4,3,2,8,9) cor(C,D,method= "spearman") library(boot) myCor=function(data

Re: [R] Confidence intervals around the MIC (Maximal information coefficient)

2017-12-10 Thread varin sacha via R-help
ults,type="all") Hope this helps, Rui Barradas On 12/10/2017 3:19 PM, varin sacha via R-help wrote: > Dear R-Experts, > > Here below is my R code (reproducible example) to calculate the confidence > intervals around the spearman coefficient. > > #

Re: [R] Confidence intervals around the MIC (Maximal information coefficient)

2017-12-10 Thread varin sacha via R-help
second returns a symmetric matrix. Just like cor() David L. Carlson Department of Anthropology Texas A&M University -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of varin sacha via R-help Sent: Sunday, December 10, 2017 11:07 AM To: Rui Barradas ; R-h

[R] can not install package "matie"

2018-03-28 Thread varin sacha via R-help
Dear R-experts, I can not install the package "matie". If somebody can tell me where the problem is. > install.packages("matie") Installing package into ‘/Users/Caro/Library/R/3.3/library’ (as ‘lib’ is unspecified) essai de l'URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/matie_

Re: [R] can not install package "matie"

2018-03-30 Thread varin sacha via R-help
e my brevity. On March 28, 2018 3:38:27 PM PDT, Duncan Murdoch wrote: >On 28/03/2018 6:27 PM, varin sacha via R-help wrote: >> Dear R-experts, >> >> I can not install the package "matie". If somebody can tell me where >the problem is. >> >>>

[R] Fast tau-estimator line does ot appear on the plot

2018-03-31 Thread varin sacha via R-help
Dear R-experts, Here below my reproducible R code. I want to add many straight lines to a plot using "abline" The last fit (fast Tau-estimator, color yellow) will not appear on the plot. What is going wrong ? Many thanks for your reply. ## Y=c(2,4,5,4,3,4,2,3,56,5,4,3,4,5,6,5,4,5,34,21

Re: [R] Fast tau-estimator line does ot appear on the plot

2018-03-31 Thread varin sacha via R-help
Many thanks Duncun, Best, Le samedi 31 mars 2018 à 18:05:53 UTC+2, Duncan Murdoch a écrit : On 31/03/2018 11:57 AM, varin sacha via R-help wrote: > Dear R-experts, > > Here below my reproducible R code. I want to add many straight lines to a > plot using "ablin

Re: [R] Fast tau-estimator line does not appear on the plot

2018-04-06 Thread varin sacha via R-help
t;) legend("topright",c("OLS", "L1", "Huber M-estimator", "Tukey", "MM", "fast tau"),inset=0.02,lwd=2,col=c("black","blue","red","purple","green", "yellow"),cex=.9)} ##

Re: [R] Fast tau-estimator line does not appear on the plot

2018-04-08 Thread varin sacha via R-help
a as slope   abline( fast$beta, col="yellow" )   legend( "topright"         , c( "OLS"             , "L1"             , "Huber M-estimator"             , "Tukey"             , "MM"             , "fast tau"             )      

[R] cvTools for 2 models not working

2018-04-13 Thread varin sacha via R-help
Dear R-experts, I am trying to do cross-validation for different models using the cvTools package. I can't get the CV for the "FastTau" and "hbrfit". I guess I have to write my own functions at least for hbrfit. What is going wrong with FastTau ? Here below the reproducible example. It is a si

[R] Cross-validation : can't get the predicted response on the testing data

2018-04-21 Thread varin sacha via R-help
Dear R-experts, Doing cross-validation for 2 robust regressions (HBR and fast Tau). I can't get the 2 errors rates (RMSE and MAPE). The problem is to predict the response on the testing data. I get 2 error messages. Here below the reproducible (fictional example) R code. #install.packages("MLm

[R] Zero errors : Bug in my R code ?

2018-04-25 Thread varin sacha via R-help
Dear R-experts, I guess I have a problem with my fast function (fast tau estimator) here below. Indeed, zero errors look highly suspicious. I guess there is a bug in my R code. How could I correct my R code ? # install.packages( "robustbase" ) # install.packages( "MASS" ) # install.packages( "q

[R] Average of results coming from B=100 repetitions (looping)

2018-05-08 Thread varin sacha via R-help
Dear R-experts, Here below the reproducible example. I am trying to get the average of the 100 results coming from the "lst" function. I have tried lst$mean and mean(lst). It does not work. Any help would be highly appreciated.  ## R script for getting MedAe and MedAeSQ

Re: [R] Average of results coming from B=100 repetitions (looping)

2018-05-08 Thread varin sacha via R-help
Many thanks for all of you for your responses. Best Regards, SV Le mardi 8 mai 2018 à 21:58:37 UTC+2, Daniel Nordlund a écrit : On 5/8/2018 12:26 PM, varin sacha via R-help wrote: > >  Dear R-experts, > > Here below the reproducible example. I am trying to get the av

[R] Bootstrap and average median squared error

2018-05-21 Thread varin sacha via R-help
Dear R-experts, I am trying to bootstrap (and average) the median squared error evaluation metric for a robust regression. I can't get it. What is going wrong ? Here is the reproducible example. # install.packages( "quantreg" ) library(quantreg) crp <-c(12,14,13,24

Re: [R] Bootstrap and average median squared error

2018-05-23 Thread varin sacha via R-help
Hi Rui and Daniel, Many thanks for your responses. It perfectly works. Best, Le mardi 22 mai 2018 à 12:47:14 UTC+2, Rui Barradas a écrit : Hello, Right! I copied from the OP's question without thinking about it. Corrected would be bootMedianSE <- function(data, indices){     d <- d

[R] Plots for lmrob function

2016-05-20 Thread varin sacha via R-help
Dear R-helpers, I have fitted a robust regression using lmrob function from robustbase package. I try to get the different plots for diagnostics of residuals and others. I can't get them, a window opens but nothing appears on it (the window remains white, no graph appears) and I get this error

Re: [R] Plots for lmrob function

2016-05-22 Thread varin sacha via R-help
Perfect, many thanks Best S De : David Winsemius À : varin sacha Cc : R-help Mailing List Envoyé le : Vendredi 20 mai 2016 21h13 Objet : Re: [R] Plots for lmrob function > On May 20, 2016, at 8:28 AM, varin sacha via R-help > wrote: > > Dear R-helpers, > &g

[R] BCa Bootstrapped regression coefficients from lmrob function not working

2016-07-03 Thread varin sacha via R-help
Dear R-experts, I am trying to calculate the bootstrapped (BCa) regression coefficients for a robust regression using MM-type estimator (lmrob function from robustbase package). My R code here below is showing a warning message ([1] "All values of t are equal to 22.2073014256803\n Can not cal

Re: [R] BCa Bootstrapped regression coefficients from lmrob function not working

2016-07-05 Thread varin sacha via R-help
t working > On 03 Jul 2016, at 13:47 , varin sacha via R-help > wrote: > > Dear R-experts, > > I am trying to calculate the bootstrapped (BCa) regression coefficients for a > robust regression using MM-type estimator (lmrob function from robustbase > package). &g

Re: [R] BCa Bootstrapped regression coefficients from lmrob function not working

2016-07-06 Thread varin sacha via R-help
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Jul 5, 2016 at 2:51 PM, varin sacha via R-help wrote: > Dear Professor Dalgaard, > > I really thank you lots for your response. I have solved my problem. Now, I > have tried to do the s

Re: [R] BCa Bootstrapped regression coefficients from lmrob function not working

2016-07-06 Thread varin sacha via R-help
calculate ? Best S - Mail original - De : peter dalgaard À : varin sacha Cc : Bert Gunter ; R-help Mailing List Envoyé le : Mercredi 6 juillet 2016 11h05 Objet : Re: [R] BCa Bootstrapped regression coefficients from lmrob function not working Offhand, I would suspect that the cause is

Re: [R] BCa Bootstrapped regression coefficients from lmrob function not working

2016-07-06 Thread varin sacha via R-help
Bootstrapped regression coefficients from lmrob function not working On 06/07/2016 7:56 AM, varin sacha via R-help wrote: > Dear Professor Dalgaard, > > Okay, this is what I was afraid of. > Many thanks for your response. I know that my next question is off-topic here > (on this web

[R] BCa confidence bands around fitted curves MARS regression

2016-09-25 Thread varin sacha via R-help
Dear R-experts, I have fitted a MARS regression and am trying now to plot/draw the BCa confidence bands around the 3 fitted curves (QUALITESANSREDONDANC, competitivite and innovation). Here is the reproducible example. Dataset = data.frame(PIBparHab=c(43931,675

Re: [R] BCa confidence bands around fitted curves MARS regression

2016-10-02 Thread varin sacha via R-help
e? If not, why not? If so, show us the code that failed. Or am I missing the point? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip

[R] MSE Cross-validation with factor interactions terms MARS regression

2018-10-29 Thread varin sacha via R-help
Dear R-experts, I am having trouble while doing crossvalidation with a MARS regression including an interaction term between a factor variable (education) and 1 continuous variable (age). How could I solve my problem ? Here below my reproducible example. ### install.packages("ISLR") lib

Re: [R] MSE Cross-validation with factor interactions terms MARS regression

2018-10-29 Thread varin sacha via R-help
County" comic strip ) On Mon, Oct 29, 2018 at 1:46 PM varin sacha via R-help wrote: > > Dear R-experts, > I am having trouble while doing crossvalidation with a MARS regression > including an interaction term between a factor variable (education) and 1 > continuous vari

Re: [R] MSE Cross-validation with factor interactions terms MARS regression

2018-10-30 Thread varin sacha via R-help
l de facto contains both education as a numeric predictor and as.factor(education) as well as the interaction term age:as.factor(education). Does that make sense modelling-wise?? -pd > On 29 Oct 2018, at 23:50 , varin sacha via R-help > wrote: > > Hi Bert, > > Many thanks,

[R] Bootstrapped CIs of MSE for (G)AM model

2018-11-22 Thread varin sacha via R-help
Dear R-experts, I am trying to get the bootstrapped confidence intervals of Mean squared error (MSE) for a (G)AM model. I get an error message. Here below the reproducible R code. Many thanks for your response. install.packages("ISLR") library(ISLR) install.packages("mgc

Re: [R] Bootstrapped CIs of MSE for (G)AM model

2018-11-22 Thread varin sacha via R-help
pe <- c("norm","basic", "stud", "perc") > boot.ci(results, type = ci.type) > > > > Hope this helps, > > Rui Barradas > > Às 20:36 de 22/11/2018, varin sacha via R-help escreveu: >> Dea

Re: [R] Bootstrapped CIs of MSE for (G)AM model

2018-11-26 Thread varin sacha via R-help
pe = ci.type) # view results results plot(results) # get 95% confidence intervals boot.ci(results, type="all")  # # # # # # # # # # # # # # # # # # # # # # # # # # Le vendredi 23 novembre 2018 à 00:20:41 UTC+1, varin sacha via R-help a écrit : Great, many thanks Rui, it perfe

[R] Fit CMARS with R possible (Packages) ?

2019-01-04 Thread varin sacha via R-help
Dear R-experts, We can fit MARS regression using the packages "earth" and/or "mda" or others packages. However, I am wondering if it is possible to fit a CMARS (Conic multivariate adaptive regression splines) using R ? I have googled "conic MARS with R software", I did not get anything, so Goog

Re: [R] Fit CMARS with R possible (Packages) ?

2019-01-07 Thread varin sacha via R-help
any R > software.  Maybe you can do better. > > -- Bert > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along and > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip

[R] mgcv : 3-way interaction and 3D-plots ?

2019-01-07 Thread varin sacha via R-help
Dear R-experts, I have fitted a model with 2-way and 3-way interactions. I would like, for the 3-way interaction (year,age,by=education), to obtain 3D-plots. How could I do that ? Many thanks for your response. Here is the reproducible example: # install.packages("ISLR") library

Re: [R] mgcv : 3-way interaction and 3D-plots ?

2019-01-12 Thread varin sacha via R-help
C, data=mydata,        groups=A,        panel=panel.bwplot.superpose, ## take control of colors of the boxes        horizontal=FALSE,        between=list(x=1, y=1)) ) On Mon, Jan 7, 2019 at 7:59 PM David Winsemius wrote: > > On 1/7/19 3:35 PM, varin sacha via R-help wrote: >> Dear R-experts

[R] Visreg package : Legend to large and 3 ways-interactions possible ?

2019-01-12 Thread varin sacha via R-help
Dear R-experts, The reproducible example is below. I am trying to use the visreg package for 2 ways-interactions and for 3 ways-interactions. For 2 ways-interactions, everything goes fine except that the legend on the top (2.HS Grad ; 3. Some College ; 4. College Grad) is not entire/complete, b

[R] BCa Bootstrap confidence intervals

2016-04-02 Thread varin sacha via R-help
Dear R-Experts, Thanks to Prof. Bonnett, I have got an R script working to calculate confidence intervals around the semipartial correlation coefficients. Now, I would like to calculate BCa bootstrap CIs using the boot library and the boot.ci(results, type="all") function. How could I modify my

Re: [R] Test for Homoscedesticity in R Without BP Test

2016-04-04 Thread varin sacha via R-help
Hi Deepak, In econometrics there is another test very often used : the white test. The white test is based on the comparison of the estimated variances of residuals when the model is estimated by OLS under the assumption of homoscedasticity and when the model is estimated by OLS under the assump

[R] Robust MARS regression with R ?

2016-05-04 Thread varin sacha via R-help
Dear R-helpers, I would like to know if it is possible using R (earth packages or another one) to realize robust MARS regression RMARS or RCMARS (C mean "conic"). Some authors have done it using MOSEK combined with Salford-MARS and special MATLAB programs. Best Regards, Sacha ___

[R] Problem with downloading library(Rcmdr)

2016-11-05 Thread varin sacha via R-help
Dear R-experts, Here below you will find my R sessionInfo. I have a problem with the library(Rcmdr). The error message is here below. How can I solve that problem ? Many thanks. sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: macOS Sierr

Re: [R] Problem with downloading library(Rcmdr)

2016-11-05 Thread varin sacha via R-help
Cc : R-help Mailing List Envoyé le : Samedi 5 novembre 2016 20h42 Objet : Re: [R] Problem with downloading library(Rcmdr) > On Nov 5, 2016, at 11:27 AM, varin sacha via R-help > wrote: > > Dear R-experts, > > Here below you will find my R sessionInfo. I have a problem with t

Re: [R] Problem with downloading library(Rcmdr)

2016-11-06 Thread varin sacha via R-help
u can read here below. What am I doing wrong ? > R CMD INSTALL -1 rlme_0.4.tar.gz Erreur : unexpected symbol in "R CMD" - Mail original - De : Jeff Newmiller À : varin sacha ; varin sacha via R-help ; David Winsemius Cc : R-help Mailing List Envoyé le : Dimanche 6 novemb

Re: [R] Save a generated .txt (or .csv) file on the desktop

2017-02-01 Thread varin sacha via R-help
Mark, Many thanks for your response. Best, S De : Mark Sharp Cc : R-help Mailing List Envoyé le : Lundi 30 janvier 2017 23h04 Objet : Re: [R] Save a generated .txt (or .csv) file on the desktop You can define the "file" argument in your call to write.csv(

[R] How to correct my error message

2020-10-27 Thread varin sacha via R-help
Dear R-experts, Here below my R code. The warning message is not a problem to me but there is an error message more problematic. I understand the error message but I don't know if it is possible to correct the error and if yes, how to correct it. Many thanks. n <- 60 b <- runif(n, 0, 5) a <-

Re: [R] How to correct my error message

2020-11-03 Thread varin sacha via R-help
bs) Thanks. Md On Tue, Oct 27, 2020 at 7:21 PM Sarah Goslee wrote: > Hi, > > a is of length 60. > b is of length 60. > z is of length 57. > > What do you expect to have happen when you create y_model ? What > happens to those other 3 observations? > > Sarah >

Re: [R] How to correct my error message

2020-11-03 Thread varin sacha via R-help
Many thanks Duncan, It works ! Best. Le mardi 27 octobre 2020 à 20:49:25 UTC+1, Duncan Murdoch a écrit : On 27/10/2020 3:06 p.m., varin sacha via R-help wrote: > Dear R-experts, > > Here below my R code. The warning message is not a problem to me but there is &

[R] nlcor package

2020-11-03 Thread varin sacha via R-help
Dear R-helpers, Here below my R code showing warnings and error messages I don't understand. What is going wrong ? install.packages("devtools") library(devtools) install_github("ProcessMiner/nlcor") library(nlcor) A=c(505, 530, 419, 486, 608, 468, 519, 486, 532, 289, 5

[R] "NaN" answer don't understand why

2020-11-13 Thread varin sacha via R-help
Dear R-experts, Here below my reproducible example. No error message but I can not get a result. I get "NaN" as a result. I don't understand what is going on. Many thanks for your precious help, as usual.  # # # # # # # # # # # # # # # # # # # # # # # # # x<-c(499,491,500,517,438,495,501,525,5

Re: [R] "NaN" answer don't understand why

2020-11-14 Thread varin sacha via R-help
rs.  However this would probably break some existing code, since there are various functions that return NULL instead of numeric(0). -Bill On Fri, Nov 13, 2020 at 2:05 PM varin sacha via R-help wrote: > Dear R-experts, > > Here below my reproducible example. No error message but I can not g

[R] AIC for robust GAM ?

2021-01-06 Thread varin sacha via R-help
Dear R-Experts, Here below my reproducible R code. How can I get the AIC of my model (robust GAM) ? Best Regards, y<-c(499,491,500,517,438,495,501,525,516,494,500,453,479,481,505,465,477,520,520,480,477,416,502,503,497,513,492,469,504,482,502,498,463,504,495) x<-c(499,496,424,537,480,484,503,57

Re: [R] AIC for robust GAM ?

2021-01-07 Thread varin sacha via R-help
cking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Jan 6, 2021 at 12:17 PM varin sacha via R-help wrote: > Dear R-Experts, > > Here below my reproducible R code. > How can I get the

[R] Problem with a LOESS curve

2021-01-09 Thread varin sacha via R-help
Dear R-experts, Here below my R code. What is happening with my green curve ? How to solve the problem ? Many thanks, ## #DATA y<-c(499,491,500,517,438,495,501,525,516,494,500,453,479,481,505,465,477,520,520,480,477,416,502,503,497,513,492,469,504,482,502,498,463,504

Re: [R] Problem with a LOESS curve

2021-01-10 Thread varin sacha via R-help
ry o <- order(x) lines(x[o], yfit[o], col="green", lwd=2) Duncan Murdoch On 09/01/2021 2:58 p.m., varin sacha via R-help wrote: >

[R] Green curve/line does not appear on the plot

2021-01-10 Thread varin sacha via R-help
Dear R-experts, I dont get any error message but I can't get the green curve/line on the plot. What is going on ? How to solve my problem ? Here is the R code : PIB.hab<-c(12000,34000,25000,43000,12500,32400,76320,45890,76345,90565,76580,45670,23450,34560,65430,65435,56755,8

[R] package not available for R version...

2021-01-12 Thread varin sacha via R-help
Dear R-experts, I have tried to reach the maintainer of the rgam package. Until now, no response. Since I'm in a bit of a hurry, I try to reach you because as I try to install the rgam package using the command : install.packages("rgam") I get this warning message : Warning message: package

Re: [R] package not available for R version...

2021-01-15 Thread varin sacha via R-help
y to respond to these kinds of questions. Also, I note the most obvious choice for GAM-based models in R, is mgcv, which ships with R. But there are other packages, if mgcv doesn't meet your needs. On Wed, Jan 13, 2021 at 8:44 AM varin sacha via R-help wrote: > > Dear R-experts, > >

Re: [R] package not available for R version...

2021-01-15 Thread varin sacha via R-help
Murdoch wrote: > > On 12/01/2021 2:43 p.m., varin sacha via R-help wrote: >> Dear R-experts, >> I have tried to reach the maintainer of the rgam package. Until now, no >> response. >> Since I'm in a bit of a hurry, I try to reach you because as I try to &g

[R] Error in UseMethod("predict")

2021-01-17 Thread varin sacha via R-help
Dear R-experts, Here below my reproducible R code. I get an error message (end of code) I can't solve. Many thanks for your help. ## #Data y=c(34000,45000,19000,48900,65000,67000,78000,9,51000,32000,54000,85000,38000,76345,87654,90990,78654,67894,56789,65432,18998,789

Re: [R] Error in UseMethod("predict")

2021-01-17 Thread varin sacha via R-help
at the top. They should  remain untouched during your program.     However in the loop you redefine y and then use the redefined y as an argument to robustgam() the next time through     the loop. This looks like a serious error. HTH, Eric On Sun, Jan 17, 2021 at 12:20 PM varin sacha via R-help w

  1   2   3   >