Re: [R] problem with my base_df function ?

2025-04-16 Thread varin sacha via R-help
the following error , at the following point in the code ..." ) On 2025-04-16 12:11 p.m., varin sacha via R-help wrote: > R-experts, > > The R script here below. > > How to solve my problem ? > > Best, > > > ## > # Load packa

[R] problem with my base_df function ?

2025-04-16 Thread varin sacha via R-help
R-experts, The R script here below. How to solve my problem ?  Best, ## # Load packages   install.packages("remotes") remotes::install_github("bd2kccd/r-causal")   # Install 'gssr' from 'ropensci' universe install.packages('gssr', repos =  c('https://kjhealy.r-unive

[R] 3 way crosstable not working

2025-03-25 Thread varin sacha via R-help
Dear R-experts, Here below a toy example not working. After some researches on the Net, still don't get it ! Many thanks for your precious help. # library(knitr) library(ggplot2) library(pollster) library(dplyr)   statut=c("married","not married","not married","mar

[R] Plotting extrapolation with R like AUTOBOX does

2024-01-14 Thread varin sacha via R-help
Dear R-experts, I write to you to know if somebody is aware of a R package (or function) able to plot graphs for extrapolation. I need to be clear on what extrapolation really is to me. It is when we use the model for X variables outside the range of X variables that were used to construct the

Re: [R] Fwd: Strange results : bootrstrp CIs

2024-01-14 Thread varin sacha via R-help
Dear R-experts, I really thank you all for your responses. Best, Le dimanche 14 janvier 2024 à 10:22:12 UTC+1, Duncan Murdoch a écrit : On 13/01/2024 8:58 p.m., Rolf Turner wrote: > On Sat, 13 Jan 2024 17:59:16 -0500 > Duncan Murdoch wrote: > > > >> My guess is that one of the boot

Re: [R] Strange results : bootrstrp CIs

2024-01-13 Thread varin sacha via R-help
Time)     library(boot) func= function(data, idx) { coef(lm(Score~ Time + factor(Country),data=data[idx,])) } B= boot(e, func, R=1000)   boot.ci(B, index=2, type="perc") # Le samedi 13 janvier 2024 à 21:56:58 UTC+1, Ivan Kr

[R] Strange results : bootrstrp CIs

2024-01-13 Thread varin sacha via R-help
Dear R-experts, Here below, my R code working BUT I get a strange result I was not expecting! Indeed, the 95% percentile bootstrap CIs is (-54.81, -54.81 ). Is anything going wrong? Best, ## Score=c(345,564,467,675,432,346,476,512,567,543,234,435,654,411

Re: [R] ggplot2: Get the regression line with 95% confidence bands

2023-12-12 Thread varin sacha via R-help
; On 12/10/2023 2:50 PM, Rui Barradas wrote: >> Às 22:35 de 10/12/2023, varin sacha via R-help escreveu: >>> >>> Dear R-experts, >>> >>> Here below my R code, as my X-axis is "year", I must be missing one >>> or more steps! I am trying to

[R] ggplot2: Get the regression line with 95% confidence bands

2023-12-10 Thread varin sacha via R-help
Dear R-experts, Here below my R code, as my X-axis is "year", I must be missing one or more steps! I am trying to get the regression line with the 95% confidence bands around the regression line. Any help would be appreciated. Best, S. # library(g

Re: [R] Cannot calculate confidence intervals NULL

2023-11-20 Thread varin sacha via R-help
y's are not looked for in data (i.e. NSE) but in the environment where the function was defined, which is standard evaluation. Change the above to: cor1 <- with(d, cor(x1, y1, method="spearman"))  cor2 <- with(d, cor(x2, y2, method="spearman")) and all should be fi

[R] Cannot calculate confidence intervals NULL

2023-11-15 Thread varin sacha via R-help
R-Experts, Here below my R code working without error message but I don't get the results I am expecting. Here is the result I get: [1] "All values of t are equal to 0.28611928397257 \n Cannot calculate confidence intervals" NULL If someone knows how to solve my problem, really appreciate. Bes

Re: [R] Plot for 10 years extrapolation

2023-10-28 Thread varin sacha via R-help
Dear Rui, I really thank you a lot for your precious R help. It is exactly what I was trying to do! Once more, many thanks! Best, Sacha Le vendredi 27 octobre 2023 à 09:36:18 UTC+2, Rui Barradas a écrit : Às 19:23 de 26/10/2023, varin sacha via R-help escreveu: > Dear R-Expe

[R] Plot for 10 years extrapolation

2023-10-26 Thread varin sacha via R-help
Dear R-Experts, Here below my R code working but I don't know how to complete/finish my R code to get the final plot with the extrapolation for the10 more years. Indeed, I try to extrapolate my data with a linear fit over the next 10 years. So I create a date sequence for the next 10 years and

Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-24 Thread varin sacha via R-help
Dear Rui, I really thank you a lot for your response and your R code. Best, Sacha Le mardi 24 octobre 2023 à 16:37:56 UTC+2, Rui Barradas a écrit : Às 20:12 de 23/10/2023, varin sacha via R-help escreveu: > Dear R-experts, > > I really thank you all a lot for your responses.

Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-23 Thread varin sacha via R-help
o that it >is >      >> > not necessary to rerun your code. This might enable someone to see >the >      >> > problem without running the code (e.g. downloading packages, etc.) >      >> >      >> And it's not necessarily true

[R] running crossvalidation many times MSE for Lasso regression

2023-10-22 Thread varin sacha via R-help
Dear R-experts, Here below my R code with an error message. Can somebody help me to fix this error?  Really appreciate your help. Best, # MSE CROSSVALIDATION Lasso regression  library(glmnet)   x1=c(34,35,12,13,15,37,65,45,47,67,87,

[R] Exact 95% CIs weibull distribution

2023-06-01 Thread varin sacha via R-help
R-experts, I am trying to find the exact 95% confidence intervals of the mean (and the median) for the weibull distribution. Here below I have the exact 95% CIs of the meanlog and the median for a lognormal using EnvStats library (ready-to-run function in library) but I don't find how to get th

Re: [R] RandomForest tuning the parameters

2023-05-13 Thread varin sacha via R-help
, May 9, 2023 at 6:40 AM Eric Berger wrote: > Hi, > One problem you have is with the command: > regr<-randomForest(y~x1+x2, data=X_train, proximity=TRUE) > > What you need is something like this: > > X2 <- cbind(X,y) > regr<-randomForest(y~x1+x2, data=X2, proxi

[R] RandomForest tuning the parameters

2023-05-08 Thread varin sacha via R-help
Dear R-experts, Here below a toy example with some error messages, especially at the end of the code (Tuning the parameters). Your help to correct my R code would be highly appreciated. ### #libraries library(lattice) library(ggplot2) library(caret) library(

[R] 2 bands (confidence and prediction) on the same GAM plot?

2023-05-01 Thread varin sacha via R-help
Dear R-experts, Here below my R code (toy example) working! The only thing missing is in my GAM plot: I would like to get on the same graph the 2 bands (prediction and confidence bands) like in my lm model graph! Is it possible? How to get that?

Re: [R] NaN response with gam (mgcv library)

2023-05-01 Thread varin sacha via R-help
Dear Simon, Thanks ! It works ! Best, Le lundi 1 mai 2023 à 11:19:26 UTC+2, Simon Wood a écrit : try... sum(residuals(model1)^2) On 30/04/2023 22:03, varin sacha via R-help wrote: > Dear R-experts, > > Here below my R code. I get a NaN response for gam with mgcv librar

[R] NaN response with gam (mgcv library)

2023-04-30 Thread varin sacha via R-help
Dear R-experts, Here below my R code. I get a NaN response for gam with mgcv library. How to solve that problem? Many thanks. # library(mgcv)   y=c(23,24,34,40,42,43,54,34,52,54,23,32,35,45,46,54,34,36,37,48) x1=c(0.1,0.3,0.5,0.7,0.8,0.9,0.

[R] Bias and variance tradeoff

2023-04-26 Thread varin sacha via R-help
Dear R-experts, Here below a toy example to calculate the MSE (mean squared error).  Starting from this equation : MSE = bias^2 + variance + irreducible error I am trying to get the bias and the variance in addition to the MSE. How to get them both? Many thanks for your help. ###

[R] problem installing RUcausal library

2023-04-22 Thread varin sacha via R-help
Me again ! How to solve this? At the end of this page there is the installation command : https://gitlab.science.ru.nl/gbucur/RUcausal/-/blob/master/README.Rmd Working with a MAC, I have tried to install the RUcausal library (copy and paste the installation command). It is written that the pack

Re: [R] problem installing RGBL library

2023-04-22 Thread varin sacha via R-help
Bert, Thanks ! It works ! Best, Le samedi 22 avril 2023 à 19:42:18 UTC+2, Bert Gunter a écrit : Is lvida.R in your working directory? Try using the full path name to the file instead in source() -- Bert On Sat, Apr 22, 2023 at 9:38 AM varin sacha via R-help wrote: > &g

Re: [R] problem installing RGBL library

2023-04-22 Thread varin sacha via R-help
Best, Le samedi 22 avril 2023 à 18:30:48 UTC+2, Eric Berger a écrit : looks fine. what's the problem? On Sat, Apr 22, 2023 at 7:27 PM varin sacha wrote: > Eric, > > Here it is : > > > library(RBGL) > Loading required package: graph > Loading required

Re: [R] problem installing RGBL library

2023-04-22 Thread varin sacha via R-help
’ The following objects are masked from ‘package:igraph’:   bfs, dfs, transitivity Le samedi 22 avril 2023 à 18:12:56 UTC+2, Eric Berger a écrit : What happens with the command > library(RBGL) On Sat, Apr 22, 2023 at 7:08 PM varin sacha via R-help wrote: > Dear R-e

[R] problem installing RGBL library

2023-04-22 Thread varin sacha via R-help
Dear R-experts, How to solve that problem? My R version is 4.2.1 Here below trying to install RGBL library found here :  https://bioconductor.org/packages/release/bioc/html/RBGL.html So, I run this R code : if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocM

[R] Get the graph of CAM (Causal additive model)?

2023-03-18 Thread varin sacha via R-help
Dear R-experts, Here below my R code working but I would like to plot (get the graph) of the Causal additive model exactly the same way I get the graph (CPDAG) from the bnlearn R package. Is it possible? If yes, how? Many thanks ### # libraries library(devtools)

Re: [R] Problem of intercept?

2023-02-22 Thread varin sacha via R-help
this is quite clearly not the case. I suppose you may have intended to fit the models _with_ the intercept and then _ignore_ the intercept for plotting purposes, i.e. lm(y~x11+x12, Dataset)$coef[-1], etc.? (Also, I suspect that you don't actually have y=7 and y=867 in the dataset.) -pd

Re: [R] GAM with binary predictors

2023-02-21 Thread varin sacha via R-help
11 feb. 2023 om 18:35 schreef varin sacha via R-help : > Dear R-experts, > > I am trying to fit a GAM with 2 binary predictors (variables coded 0,1). I > guess I cannot just smooth binary variables. By the way I code them as > 0=no,1=yes, then mgcv will think those variables are

[R] Problem of intercept?

2023-02-21 Thread varin sacha via R-help
Dear R-experts, Here below my R code working with quite a few warnings.  x11 and x12 are dichotomous variable (0=no and 1=yes). I substract 1 to ignore intercept. I would like not to ignore intercept. How to modify my R code because if I just remove -1 it does not work? y= c(32,45,65,34,23,43,

[R] GAM with binary predictors

2023-02-11 Thread varin sacha via R-help
Dear R-experts, I am trying to fit a GAM with 2 binary predictors (variables coded 0,1). I guess I cannot just smooth binary variables. By the way I code them as 0=no,1=yes, then mgcv will think those variables are numeric.  I have tried to change 0 and 1 in no and yes. It does not work. How to

Re: [R] package FactoMineR

2023-01-24 Thread varin sacha via R-help
ersions. Probably simple ... in function definition and print(plot(res, axes > = axes, ...)) addition could do the trick, but I am not sure. > > Cheers > Petr > >> -Original Message- >> From: R-help On Behalf Of varin sacha via R- >> help >>

[R] package FactoMineR

2023-01-23 Thread varin sacha via R-help
Dear R-experts, Here below the R code working (page 8  http://www2.uaem.mx/r-mirror/web/packages/FactoMineR/FactoMineR.pdf).  But I am trying to get all the labels (the writes) : comfort, university, economic, world, ... smaller.  How could I do that ? Many thanks. library(FactoMineR) data(chi

Re: [R] IGCI implemented in R package ?

2022-11-23 Thread varin sacha via R-help
https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/index.html > > HTH, > Eric > > >> On Mon, Nov 21, 2022 at 9:00 PM varin sacha via R-help >> wrote: >> Dear R experts, >> >> Google is very often my friend but this time it does not ! >> Are you

[R] IGCI implemented in R package ?

2022-11-21 Thread varin sacha via R-help
Dear R experts, Google is very often my friend but this time it does not ! Are you aware of an R package in which the directed causal discovery algorithm called the Information Geometric Causal Inference (IGCI) of (Daniusis et al., 2010) is implemented ? Best, Sacha Envoyé de mon iPhone _

[R] bootstrap CI of the difference between 2 Cramer's V

2022-05-28 Thread varin sacha via R-help
Dear R-experts, While comparing groups, it is better to assess confidence intervals of those differences rather than comparing confidence intervals for each group. I am trying to calculate the CIs of the difference between the two Cramer's V and not the CI to the estimate of each group’s Cramer'

[R] pcalg library : names of the variables ?

2022-05-12 Thread varin sacha via R-help
Dear R-experts, Here below my R code working but I would like to get the names of the variables to appear on the graph instead of 1 ; 2 ; 3 and 4. Is it possible ? I have tried something with colnames(x) but I get an error message. Many thanks for your help. # librar

[R] pcalg library : estimated DAG graph

2022-03-31 Thread varin sacha via R-help
Dear R-experts, Here below my R code working but I don't know how I can get the graph (estimated DAG). If you could help me to get the graph, many thanks. ### library(pcalg) x1<-c(508,413,426,500,568,372,484,512,529,322,544,586,480,561,567,488,450,548,526,561,435,567,537,521,5

Re: [R] dagitty library : NULL response

2022-03-31 Thread varin sacha via R-help
djust(r$p.value, method = "holm")) : #  no non-missing arguments to min; returning Inf p.dagitty.param.correct #[1] Inf Hope this helps, Rui Barradas Às 10:58 de 31/03/2022, varin sacha via R-help escreveu: > Dear R-experts, > > Here below my R code (toy example). No

Re: [R] Problem downloading pcalg library/package

2022-03-24 Thread varin sacha via R-help
icate cannot be authenticated with given CA certificates' Le jeudi 24 mars 2022, 14:39:03 UTC+1, Ivan Krylov a écrit : On Thu, 24 Mar 2022 13:29:45 + (UTC) varin sacha wrote: > I have changed my CRANmirror to the Switzerland (ETHZ) one using the > function you sent to

Re: [R] Exact 95% CI around the mean for LogNormal distribution

2022-03-24 Thread varin sacha via R-help
Many thanks for your response. Le mercredi 16 mars 2022, 21:11:06 UTC+1, varin sacha via R-help a écrit : Dear R-experts, I have used the EnvStats package and the elnorm function (p. 248). I would like to calculate the exact 95% confidence intervals around the mean, not around

[R] Problem downloading pcalg library/package

2022-03-24 Thread varin sacha via R-help
Dear R-experts, Here below my sessionInfo( ). I cannot download the pcalg package/library. Is my R version too old ? sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS High Sierra 10.13.6 Matrix products: default BLAS:   /Library/Framewo

[R] Exact 95% CI around the mean for LogNormal distribution

2022-03-16 Thread varin sacha via R-help
Dear R-experts, I have used the EnvStats package and the elnorm function (p. 248). I would like to calculate the exact 95% confidence intervals around the mean, not around the meanlog. Here below my R code, how can I get the exact 95% CIs around the mean ? Many thanks. library(EnvStats) x=rlnor

Re: [R] Exact 95% CIs around the mean for Weibull distribution

2022-02-18 Thread varin sacha via R-help
kages that appear to provide that information. Have you tried any of them? On Sun, Feb 13, 2022 at 12:44 PM varin sacha via R-help wrote: > > Dear R-experts, > > Here below my R code. I am trying to get the exact 95% confidence intervals > around the meanlog for lognormal, around the

Re: [R] Percentile bootstrap for the median : error message

2022-01-08 Thread varin sacha via R-help
  John Fox, Professor Emeritus   McMaster University   Hamilton, Ontario, Canada   Web: http::/socserv.mcmaster.ca/jfox > On Jan 8, 2022, at 12:04 PM, varin sacha via R-help > wrote: > > Dear R-experts, > > Here below my R code for the percentile bootstr

[R] Percentile bootstrap for the median : error message

2022-01-08 Thread varin sacha via R-help
Dear R-experts, Here below my R code for the percentile bootstrap confidence intervals with an error message. Is there a way to make my R code work ? Many thanks for your help and time. library(boot) s=rnorm(10,0,1) (m<-median(s)) N <- 100 n<-

Re: [R] Speed up studentized confidence intervals ?

2022-01-03 Thread varin sacha via R-help
Dear John, Dear Rui, I really thank you a lot for your R code. Best, SV Le jeudi 30 décembre 2021, 05:25:11 UTC+1, Fox, John a écrit : Dear varin sacha, You didn't correctly adapt the code to the median. The outer call to mean() in the last line shouldn't be replaced w

Re: [R] Speed up studentized confidence intervals ?

2021-12-29 Thread varin sacha via R-help
;- sample(s, size = 5)   boot.out <- boot(data = a, statistic = med, R = 1)   boot.ci(boot.out, type = "stud")$stud[, 4:5] }) mean(out[1, ] < mean(s) & mean(s) < out[2, ]) #[1] 0.952 Hope this helps, Rui Barradas Às 11:45 de 19/12/21, varin sacha via R-help escreveu:

[R] Speed up studentized confidence intervals ?

2021-12-19 Thread varin sacha via R-help
Dear R-experts, Here below my R code working but really really slowly ! I need 2 hours with my computer to finally get an answer ! Is there a way to improve my R code to speed it up ? At least to win 1 hour ;=) Many thanks library(boot)

Re: [R] Using boot.ci "norm" not working

2021-12-17 Thread varin sacha via R-help
ue in ?boot.ci. So just change $norm[, 4:5] to $norm[, 2:3] Hope this helps, Rui Barradas Às 22:24 de 16/12/21, varin sacha via R-help escreveu: > Dear R-experts, > > Here below my R code. Using "bca" in the boot.ci function at the end of my R > code works perfect

[R] Using boot.ci "norm" not working

2021-12-16 Thread varin sacha via R-help
Dear R-experts, Here below my R code. Using "bca" in the boot.ci function at the end of my R code works perfectly. Using "perc" and "basic" perfectly works as well. But using "norm", my R code does not work anymore. Is it possible to solve that problem and to make my R code work ? #

Re: [R] Repeating a R code and counting how many repetitions working

2021-12-11 Thread varin sacha via R-help
rowMeans(arr) )) #[1] 111 Now, the equal values. The return value of 1 means that all BCa intervals include mean(s). The outer mean(.) is a mean of an indicator function given by a logical conjunction. And there are only TRUE's. Hope this helps, Rui Barradas Às 15:37 de 11/12/21, va

Re: [R] Repeating a R code and counting how many repetitions working

2021-12-11 Thread varin sacha via R-help
;- 1e3, not 1e4. set.seed(2021) N <- 1e3 out <- replicate(N, {   boot.out <- boot(data = dat, statistic = med, R = 1)   boot.ci(boot.out, type = "bca")$bca[, 4:5] }) mean(out[1,] < mean(s) & mean(s) < out[2,]) Hope this helps, Rui Barradas Às 10:47 de 11/12/21, vari

[R] Repeating a R code and counting how many repetitions working

2021-12-11 Thread varin sacha via R-help
Dear R-experts, Here below my R code. I am trying to do 2 things : 1) I would like to repeat this R code 1 times 2) Out of the 1 repetitions I would have liked R to tell me how many times the "true" mean value of the population called "s" in my R example here below is included in the 1

Re: [R] bootstrap confidence intervals

2021-11-08 Thread varin sacha via R-help
Hi, Many thanks for your responses. Le samedi 6 novembre 2021, 08:39:22 UTC+1, Rui Barradas a écrit : Hello, Às 01:36 de 06/11/21, David Winsemius escreveu: > > On 11/5/21 1:16 PM, varin sacha via R-help wrote: >> Dear R-experts, >> >> Here is a toy ex

Re: [R] bootstrap confidence intervals

2021-11-08 Thread varin sacha via R-help
Hi, I really thank you a lot for your response. Le samedi 6 novembre 2021, 02:37:46 UTC+1, David Winsemius a écrit : On 11/5/21 1:16 PM, varin sacha via R-help wrote: > Dear R-experts, > > Here is a toy example. How can I get the bootstrap confidence intervals > workin

[R] bootstrap confidence intervals

2021-11-05 Thread varin sacha via R-help
Dear R-experts, Here is a toy example. How can I get the bootstrap confidence intervals working ? Many thanks for your help library(DescTools) library(boot)   A=c(488,437,500,449,364) dat<-data.frame(A) med<-function(d,i) { temp<-d[i,] HodgesLehmann(A) } boot.out<-

Re: [R] Improve my plot

2021-09-22 Thread varin sacha via R-help
"Appenzell Rhodes Extérieures","Genève","Zoug","Tessin", "Neuchâtel","Vaud","Uri","Nidwald","Berne(d)","Zurich","Obwald", "Saint-Gall","Soleure","Lucerne","Glari

Re: [R] Improve my plot

2021-09-20 Thread varin sacha via R-help
ot;Schaffhouse","Berne(f)",           "Thurgovie","Valais(f)","Argovie","Appenzell Rhodes Extérieures",           "Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald",    

[R] Improve my plot

2021-09-20 Thread varin sacha via R-help
Dear R-experts, Here below my R code. I would need your help to improve my graph/plot. - The x-axis to be longer not to stop at 500 value - All the name on the y-axis to appear not only a few of them and the name (Fribourg(f), Appenzell Rhodes Intérieures,...) to appear entire, not to be cut Ma

[R] Plot with some countries in red

2021-05-19 Thread varin sacha via R-help
Dear R-experts, Here below a toy R code example. I would like some countries (not all of them) "Italy", "Canada", "Greece" and "Norway" to appear in red color. The others remaining black. How can I do that without big changes in my R code ? Indeed, I would like my R code to remain like this as

Re: [R] empty plots !

2021-05-12 Thread varin sacha via R-help
gt; Were you expecting image files? I don't see any plot device e.g. pdf() > in your code. > > Jim > >> On Wed, May 12, 2021 at 6:34 PM varin sacha via R-help >> wrote: >> >> Dear Experts, >> >> My R code was perfectly working since I decide to

Re: [R] empty plots !

2021-05-12 Thread varin sacha via R-help
", type = 'b') points((1:30)/10, power.cors[6,], pch = 2, col = "green", type = 'b') points((1:30)/10, power.cork[6,], pch = 3, col = "blue", type = 'b') points((1:30)/10, power.dcor[6,], pch = 4, col = "red", type = 'b') po

Re: [R] No error message but don't get the 8 graphs

2021-05-11 Thread varin sacha via R-help
ng an open mind is that people keep coming along and > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Sun, May 9, 2021 at 2:59 PM varin sacha via R-help > wrote: > >> Rui, >> >> The cr

Re: [R] No error message but don't get the 8 graphs

2021-05-09 Thread varin sacha via R-help
The comments only line is your last code line. The result is attached. Hope this helps, Rui Barradas Às 19:39 de 09/05/21, varin sacha via R-help escreveu: > Dear R-experts, > > I am trying to get the 8 graphs like the ones in this paper : > https://statweb.stanford.edu/~tibs/

Re: [R] No error message but don't get the 8 graphs

2021-05-09 Thread varin sacha via R-help
Rui, Angelo, I found it :=) Many thanks S. Le dimanche 9 mai 2021 à 23:49:41 UTC+2, Angelo Canty a écrit : Have you looked in the pdf file (power.pdf) to which you instructed R to send the plots? On 2021-05-09 5:27 p.m., varin sacha via R-help wrote: > Dear Rui, > > I

Re: [R] No error message but don't get the 8 graphs

2021-05-09 Thread varin sacha via R-help
(1,2,3), col = c("black","green","blue","red")) plot((1:30)/10, power.cor[7,], ylim = c(0,1), main = "Circle", xlab = "Noise Level", ylab = "Power", pch = 1, col = "black", type = 'b') points((1:30)/10,

[R] No error message but don't get the 8 graphs

2021-05-09 Thread varin sacha via R-help
Dear R-experts, I am trying to get the 8 graphs like the ones in this paper : https://statweb.stanford.edu/~tibs/reshef/comment.pdf My R code does not show any error message neither warnings but I d'on't get what I would like to get (I mean the 8 graphs), so I am missing something. What's it ?

[R] Get 3 values not only 1

2021-01-27 Thread varin sacha via R-help
Dear R-experts, Here below my R code working but I would like to get 3 values not only 1. The value I get is, according to my R code, the variance value. My goal is to get 3 values : the bias value, the variance value and the MSE value. How to solve my problem ? Many thanks. #

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

2021-01-17 Thread varin sacha via R-help
thing like >     ypred = pred.robustgam( fit18, data.frame(X=Testing) > > 2. your logic is wrong. You define the vectors x and y at the top. They > should remain untouched during your program. >     However in the

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

[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] 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

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, > >

[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

[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

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] 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] 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] 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] "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] "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

[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

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 &

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 >

[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 <-

[R] R^2, AICc, bootstrap CIs for Orthogonal regression

2020-08-22 Thread varin sacha via R-help
Dear R-experts, I have fitted an orthogonal regression and have some difficulties to get the adjusted R^2 and R^2, the AICc, the coefficients and R^2 bootstrap confidence intervals. Here below my R codes. Many thanks for your precious help. y=c(231,212,112,143,154,165,1

Re: [R] confidence intervals for the difference between group means

2020-08-17 Thread varin sacha via R-help
Dear Matthias, Many thanks for your response. Best, SV Le mardi 4 août 2020 à 16:22:41 UTC+2, Prof. Dr. Matthias Kohl a écrit : you could try: library(MKinfer) meanDiffCI(a, b, boot = TRUE) Best Matthias Am 04.08.20 um 16:08 schrieb varin sacha via R-help: > Dear R-expe

[R] confidence intervals for the difference between group means

2020-08-04 Thread varin sacha via R-help
Dear R-experts, Using the bootES package I can easily calculate the bootstrap confidence intervals of the means like in the toy example here below. Now, I am looking for the confidence intervals for the difference between group means. In my case, the point estimate of the mean difference is 64.

Re: [R] Double MAD with R

2020-08-04 Thread varin sacha via R-help
))   }   out } double.mad(x) # lo  hi #0.81543 0.44478 double.mad(c(x, 1)) # lo  hi #2.29803 0.44478 double.mad(c(x, 1), include.right = TRUE) # lo  hi #1.03782 1.63086 Hope this helps, Rui Barradas Às 15:22 de 03/08/2020, varin sacha via R-help escreveu: > Dear R-Exper

[R] Double MAD with R

2020-08-03 Thread varin sacha via R-help
Dear R-Experts, Is there an all-ready function to calculate the Double MAD (Median absolute deviation) as there is an easy function to calculate the MAD "mad function". Or I have to write my own function for Double MAD ? To calculate the double MAD, the idea is the following : for the obtained

[R] Permutation Ramsey RESET test ?

2020-06-28 Thread varin sacha via R-help
Dear R-experts, I am trying to do a permutation test for the Ramsey RESET test. More precisely, I am interested in the "exact" p-value of the test. I have checked the coin package and all the functions (oneway_test; ...). There are plenty of functions but no one is helping me for RESET test. I

Re: [R] [External] Get a result but an error message as well ?

2020-05-27 Thread varin sacha via R-help
in `colnames<-`(`*tmp*`, value = "MSE_OLS") : #  attempt to set 'colnames' on an object with less than two dimensions mean(my.data) #[1] 105.6951 Hope this helps, Rui Barradas Às 22:25 de 19/05/20, varin sacha escreveu: > Hi Rui, > > If I don

Re: [R] [External] Get a result but an error message as well ?

2020-05-19 Thread varin sacha via R-help
C+2, Rui Barradas a écrit : Hello, Inline. Às 21:38 de 19/05/20, varin sacha via R-help escreveu: > > Hi Richard, > > Thanks for your response. > However, how can I correct my R code knowing that I want, as a result, only > one value : the mean of the 500 MSE_OLS values ?

Re: [R] [External] Get a result but an error message as well ?

2020-05-19 Thread varin sacha via R-help
0 On Tue, May 19, 2020 at 3:51 PM varin sacha via R-help wrote: > Dear R-experts, > > Here is my R code, I get a result but I also get an error message so I doubt > I can trust the result I get. > What is going wrong ? Many thanks. > >

[R] Get a result but an error message as well ?

2020-05-19 Thread varin sacha via R-help
Dear R-experts, Here is my R code, I get a result but I also get an error message so I doubt I can trust the result I get. What is going wrong ? Many thanks. a<-c(2,4,3,4,6,5,3,1,2,3,4,3,4,5,65) b<-c(23,45,32,12,23,43,56,44,33,11,12,54,23,34,54) d<-c(9,4

[R] Replication : How to get only 1 value

2020-05-07 Thread varin sacha via R-help
Dear R-experts, My goal is to get only 1 value : the average/ the mean of the 100 MSE values. How can I finish my R code ? ### my.experiment <- function()  { n<-500 x<-runif(n, 0, 5) z <- rnorm(n, 2, 3) a <- runif(n, 0, 5) y_mode

Re: [R] Fit Gaussian curve on my data ?

2020-04-27 Thread varin sacha via R-help
till could be a function representing a probability distribution... On Sun, Apr 26, 2020 at 7:09 AM varin sacha via R-help wrote: > > Dear R-experts, > > I am trying to fit a gaussian density curve. More precisely, I would like to > obtain the fitted "Gaussian curve".

  1   2   3   >