Displaying 20 results from an estimated 1000 matches similar to: "R-help Digest, Vol 250, Issue 13"
2023 May 16
0
Newbie: Drawing fitted lines on subset of data
Yep, that did it. I didn't know that you could have pipelines within
pipelines.
Thanks, again, for all your help.
-Kevin
On 5/16/23 11:44, Rui Barradas wrote:
> ?s 15:29 de 16/05/2023, Kevin Zembower via R-help escreveu:
>> Hello,
>>
>> I's still working with my tsibble of weight data for the last 20 years.
>> In addition to drawing an overall trend line,
2023 May 16
0
Newbie: Controlling legends in graphs
Rui, thanks so much for your help. Your explanation and example were
clear and concise. Thanks for taking the time and effort to help me.
-Kevin
On 5/12/23 16:06, Rui Barradas wrote:
> ?s 14:24 de 12/05/2023, Kevin Zembower via R-help escreveu:
>> Hello, I'm trying to create a line graph with a legend, but have no
>> success controlling the legend. Since nothing I've
2024 Jan 13
1
Fwd: Strange results : bootrstrp CIs
Sorry, didn't cc this to the list.
-------- Forwarded Message --------
Subject: Re: [R] Strange results : bootrstrp CIs
Date: Sat, 13 Jan 2024 17:37:19 -0500
From: Duncan Murdoch <murdoch.duncan at gmail.com>
To: varin sacha <varinsacha at yahoo.fr>
You can debug things like this by setting options(error = recover). That
will drop into the debugger when the error occurs.
2018 Apr 07
0
Fast tau-estimator line does not appear on the plot
You need to pay attention to the documentation more closely. If you don't
know what something means, that is usually a signal that you need to study
more... in this case about the difference between an input variable and a
design (model) matrix. This is a concept from the standard linear algebra
formulation for regression equations. (Note that I have never used RobPer,
nor do I regularly
2011 Oct 15
2
Irregular 3d objects with rgl
Hello,
While exploring if rgl is along the lines of what I need, I checked out
demo("rgl") and didn't find quite what I'm looking for, and am therefore
seeking additional help/suggestions.
The application is geared towards displaying a 3D rendering of a contaminant
plume in the subsurface with the following highlights: Once the plume was
rendered as a 3D object, a
2023 May 16
1
Newbie: Drawing fitted lines on subset of data
Hello,
I's still working with my tsibble of weight data for the last 20 years.
In addition to drawing an overall trend line, using lm, for the whole
data set, I'd like to draw short lines that would recompute lm and draw
it, say, just for the years from 2010:2015.
Here's a short example that I think illustrates what I'm trying to do.
The commented out sections show what
2017 Dec 10
0
Confidence intervals around the MIC (Maximal information coefficient)
You need:
myCor <- function(data, index){
mine(data[index, ])$MIC[1, 2]
}
results=boot(data = cbind(C,D), statistic = myCor, R = 2000)
boot.ci(results,type="all")
Look at the differences between:
mine(C, D)
and
mine(cbind(C, D))
The first returns a value, the second returns a symmetric matrix. Just like cor()
David L. Carlson
Department of Anthropology
Texas A&M
2024 Jan 13
1
Strange results : bootrstrp CIs
It took me a little while to figure this out, but: the problem is
that if your resampling leaves out any countries (which is very likely),
your model applied to the bootstrapped data will have fewer coefficients
than your original model.
I tried this:
cc <- unique(e$Country)
func <- function(data, idx) {
coef(lm(Score~ Time + factor(Country, levels =cc),data=data[idx,]))
}
but lm()
2024 Jan 14
1
Strange results : bootrstrp CIs
Well, this would seem to work:
e <- data.frame(Score = Score
, Country = factor(Country)
, Time = Time)
ncountry <- nlevels(e$Country)
func= function(dat,idx) {
if(length(unique(dat[idx,'Country'])) < ncountry) NA
else coef(lm(Score~ Time + Country,data = dat[idx,]))
}
B <- boot(e, func, R=1000)
boot.ci(B, index=2, type="perc")
2023 Feb 16
1
GAM with binary predictors
Dear Sacha,
use glm() in this case. I'd rather code the covariable as TRUE / FALSE or
as a factor.
Best regards,
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx at inbo.be
2018 Mar 29
1
can not install package "matie"
Varin
In the teaching you to fish department, you can find those dependencies Duncan appeared to pull out of thin air by looking at the CRAN contributed packages web pages, which can easily be found with Google. Start at the matie page and follow the dependency links and look at dependencies. In particular the error message mentioning the proxy package is a clue that dependencies might be a
2017 Oct 22
0
Add a vertical line and some values on a plot
Hello,
After the plot just do
abline(v = median(A))
As for how to plot 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 as well, i.e. 4.3 and -8.4. How
2024 Jan 13
1
Strange results : bootrstrp CIs
? Sat, 13 Jan 2024 20:33:47 +0000 (UTC)
varin sacha via R-help <r-help at r-project.org> ?????:
> coef(lm(Score~ Time + factor(Country)),data=data[idx,])
Wrong place for the data=... argument. You meant to give it to lm(...),
but in the end it went to coef(...). Without the data=... argument, the
formula passed to lm() picks up the global variables inherited by the
func() closure.
2020 Oct 27
0
How to correct my error message
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
On Tue, Oct 27, 2020 at 3:07 PM varin sacha via R-help
<r-help at r-project.org> wrote:
>
> Dear R-experts,
>
> Here below my R code. The warning message is not a problem to me but there is an error message
2018 Apr 06
1
Fast tau-estimator line does not appear on the plot
R-experts,
I have fitted many different lines. The fast-tau estimator (yellow line) seems strange to me?because this yellow line is not at all in agreement with the other lines (reverse slope, I mean the yellow line has a positive slope and the other ones have negative slope).
Is there something wrong in my R code ? Is it because the Y variable is 1 vector and should be a matrix ?
Here is the
2023 May 12
2
Newbie: Controlling legends in graphs
Hello, I'm trying to create a line graph with a legend, but have no
success controlling the legend. Since nothing I've tried seems to work,
I must be doing something systematically wrong. Can anyone point this
out to me?
Here's my data:
> weights
# A tibble: 1,246 ? 3
Date J K
<date> <dbl> <dbl>
1 2000-02-13 133 188
2
2018 May 08
0
Average of results coming from B=100 repetitions (looping)
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 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
2016 Apr 04
1
Test for Homoscedesticity in R Without BP Test
On Mon, 4 Apr 2016, varin sacha via R-help wrote:
> 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
> assumption of
2018 May 22
0
Bootstrap and average median squared error
Hello,
If you want to bootstrap a statistic, I suggest you use base package boot.
You would need the data in a data.frame, see how you could do it.
library(boot)
bootMedianSE <- function(data, indices){
d <- data[indices, ]
fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d)
ypred <- predict(fit)
y <- d$crp
median(y - ypred)^2
}
dat <-
2023 Oct 22
2
running crossvalidation many times MSE for Lasso regression
No error message shown Please include the error message so 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.)
-- Bert
On Sun, Oct 22, 2023 at 1:36?PM varin sacha via R-help
<r-help at r-project.org> wrote:
>
> Dear R-experts,
>
> Here below my R code with an error message. Can