Displaying 20 results from an estimated 2000 matches similar to: "Strange results : bootrstrp CIs"
2024 Jan 13
1
Strange results : bootrstrp CIs
Dear Duncan,
Dear Ivan,
I really thank you a lot for your response.
So, if I correctly understand your answers the problem is coming from this line:
coef(lm(Score~ Time + factor(Country)),data=data[idx,])
This line should be:
coef(lm(Score~ Time + factor(Country),data=data[idx,]))
If yes, now I get an error message (code here below)! So, it still does not work.
Error in t.star[r, ] <-
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 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.
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.
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")
2013 Apr 26
1
Error Installing packages
I am trying to install the package boss but i am getting error below:
Please advice
install.packages("boss")
--- Please select a CRAN mirror for use in this session ---
CRAN mirror
1: 0-Cloud 2: Argentina (La Plata)
3: Argentina (Mendoza) 4: Australia (Canberra)
5: Australia (Melbourne) 6: Austria
7: Belgium 8:
2009 Feb 05
2
UNIX Installation of package "systemfit" fails
Dear list
I am trying to install the systemfit package under unix,
install.packages(systemfit)
the installation failed. I am attaching the error and version
information below,
(if dependencies=TRUE, much more error)
any help appreciated
best,
yong
=====================================================================
> install.packages("systemfit")
Warning in
2005 Apr 11
0
plotting Principle components vs individual variables.
Dear R,
I'm trying to plot the first principle component of an analysis vs the first
variable but am having trouble. I have no trouble doing the initial plot
but have difficulty thereafter.
First I want to highlight some points of the following data set
list(running)
[[1]]
X100m X200m X400m X800m X1500m X5K X10K Marathon
Argentina 10.39 20.81 46.84 1.81
2005 Aug 23
2
FW: Register Today for Fall 2005 VON: "The Destination for IP Communications"
Anyone able to get me a comp/highly discounted ticket to this?
$150 just to visit the exhibition halls sounds crazy?
Dean
> -----Original Message-----
> From: Jeff Pulver [mailto:jeff@pulver.com]
> Sent: Tuesday, 23 August 2005 11:47 AM
> To: mailinglist1
> Subject: Register Today for Fall 2005 VON: "The Destination for IP
> Communications"
>
> Hi There,
>
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
2020 Oct 27
4
How to correct my error message
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 <- runif(n, 0, 5)
z <- rnorm(n*0.95,2,3) + rnorm(n*0.05,2,9)
y_model <- 0.1 * b - 0.5 *
2005 Apr 11
1
plotting Principal components vs individual variables.
At the cost of breaking the thread I'm going to change your subject and
replace 'Principle' by 'Principal'. I just can't stand it any longer...
OK, here is how I would solve your other problems. First put
> wh <- c("USA", "New Zealand", "Dominican Republic",
"Western Samoa", "Cook Islands")
> ind
2017 Dec 10
2
Confidence intervals around the MIC (Maximal information coefficient)
Hi Rui,
Many thanks. The R code works BUT the results I get are quite weird I guess !
MIC = 0.2650
Normal 95% CI = (0.9614, 1.0398)
The MIC is not inside the confidence intervals !
Is there something wrong in the R code ?
Here is the reproducible example :
##########
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)
library(minerva)
mine(C,D)$MIC
2024 Jan 14
1
Fwd: Strange results : bootrstrp CIs
On Sat, 13 Jan 2024 17:59:16 -0500
Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
<SNIP>
> My guess is that one of the bootstrap samples had a different
> selection of countries, so factor(Country) had different levels, and
> that would really mess things up.
>
> You'll need to decide how to handle that: If you are trying to
> estimate the coefficient for
2018 Mar 31
0
Fast tau-estimator line does ot appear on the plot
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 "abline"
> The last fit (fast Tau-estimator, color yellow) will not appear on the plot. What is going wrong ?
> Many thanks for your reply.
>
It's not quite reproducible: you forgot the line to create
2018 May 08
4
Average of results coming from B=100 repetitions (looping)
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 from HBR model on Testing data
install.packages("robustbase")
install.packages(
2024 Jan 14
1
Fwd: Strange results : bootrstrp CIs
On 13/01/2024 8:58 p.m., Rolf Turner wrote:
> On Sat, 13 Jan 2024 17:59:16 -0500
> Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>
> <SNIP>
>
>> My guess is that one of the bootstrap samples had a different
>> selection of countries, so factor(Country) had different levels, and
>> that would really mess things up.
>>
>> You'll
2008 Dec 13
6
Country numbering plan resources
Is there any good free / accurate online resources with detailed country
numbering plans? Failing that let's get something running ourselves.
I was also thinking maybe people present could contribute some information on
this list for now. The countries I am after are below.
To start this off I will provide the information for Australia +61 and New
Zealand +64.
NZ Cellular:
area code 21
2017 Oct 22
2
Add a vertical line and some values on a plot
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, -10.5,-8.4,-9.4)
d <- density(A)
plot(d)
median(A)
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