similar to: lm.boot function gives error

Displaying 20 results from an estimated 1000 matches similar to: "lm.boot function gives error"

2007 Oct 19
2
In a SLR, Why Does the Hat Matrix Depend on the Weights?
I understand that the hat matrix is a function of the predictor variable alone. So, in the following example why do the values on the diagonal of the hat matrix change when I go from an unweighted fit to a weighted fit? Is the function hatvalues giving me something other than what I think it is? library(ISwR) data(thuesen) attach(thuesen) fit <- lm(short.velocity ~ blood.glucose)
2003 Sep 26
3
Std. errors of intercept and slope
Dear all, I have the following output generated by linear regression. Since there is only one regression intercept and one slope for one set of data, what is the meaning of std. error for intercept and that of slope? Thanks in advance. Sincerely, Minghua > data(thuesen) > attach(thuesen) > lm(short.velocity~blood.glucose) Call: lm(formula = short.velocity ~ blood.glucose)
2011 May 03
3
na.omit - Is it working properly?
I have a work around for this, but can someone explain why the first example does not work properly? I believed it worked in the previous version of R, by selecting just the rows=200525 and omitting the na's. I just upgraded to 2.13. I am also concern with the row numbers being different in the selections, should I be worried? FYI, I just selected the first few rows for demonstration, please
2010 Jan 03
2
plot question
Hi, I am new to R so forgive me if the following query is somewhat simple.  I have a small tab-separated file with n records of glucose values, one record per day, seven measurements per day. It looks like this: date    sober    no    vm    nm    va    na    vs 20091229    NA    6.8    NA    2.7    11.7    2.7    6.2 I'd like to make a graph on which the glucose day curves are plotted
2007 Apr 09
1
ISwR library
I am learning to use R using a book that uses examples from the ISwR library so I need to have that library. When I type library (ISwR), R says: Error in library(ISwR) : there is no package called 'ISwR' Do I need to install ISwR separately? How do I do this? Thanks! -- View this message in context: http://www.nabble.com/ISwR-library-tf3548959.html#a9907582 Sent from the R help mailing
2013 Jan 07
3
renumber a list of numbers
Greetings R users, I am trying to renumber my groups within the file shown below. The groups are currently set as 8,9,10,etc. I would like to renumber this as 1,2,3,etc. I have searched the help files and only come across using the rownames to renumber the values but I need to match values. Any assistance is always appreciated, Regards, Charles structure(list(Group = structure(c(1L, 1L, 1L,
2007 Nov 14
2
Help with Bartlett's test on linear model
Hi all, I would like to test the homoegeneity of variances between several linear model for some analysis of covariance. It seems that the Bartlett's test is a good test to use but I am having problem using with linear model and I cannot find any examples on the internet. There are some examples for comparisons of variances but not linear models. If I take the hellung data set, which is
2009 Oct 27
1
"ipredknn" - How may I find values?
Hi everybody! I want to find a closer neighbourins observation. This is my code: ########################## library(klaR) library(ipred) library(mlbench) data(PimaIndiansDiabetes2) dane=na.omit(PimaIndiansDiabetes2)[,c(2,5,9)] dane[,2]=log(dane[,2]) dane[,1:2]=scale(dane[,1:2]) zbior.uczacy=sample(1:nrow(dane),nrow(dane)/2,F)
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 <-
2010 Aug 08
2
Problem with installing a package in R!
Dear friends, I am having problem with installing some packages in R in Ubuntu like "ISwR". Bellow is the outcome. Anybody can help me to solve this problem. Thanks a lot and sorry if it is very simple question. install.packages("ISwr") Loading Tcl/Tk interface ... done trying URL 'http://probability.ca/cran/src/contrib/ISwR_2.0-5.tar.gz' Content type
2018 May 22
2
Bootstrap and average median squared error
I forgot, you should also set.seed() before calling boot() to make the results reproducible. Rui Barradas On 5/22/2018 10:00 AM, Rui Barradas wrote: > 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,
2018 May 21
2
Bootstrap and average median squared error
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,25,34,45,56,25,34,47,44,35,24,53,44,55,46,36,67) bmi
2009 Aug 17
1
Multiple comparison on lme model with 2 fixed factors
Hi! I'm a bit lost while performing multiple comparisons on a lme model of that type: lmeglu=lme(glucose~Ath*tim,random=~1|Vol,na.action=na.omit,data=data) multc = glht(lmeglu, linfct = mcp(Ath = "Tukey", tim = "Tukey")) This works fine for identifying the effect of each factor. However, when I look for their interactions, l only obtain error messages. For example this
2009 May 12
1
questions on rpart (tree changes when rearrange the order of covariates?!)
Greetings, I am using rpart for classification with "class" method. The test data is the Indian diabetes data from package mlbench. I fitted a classification tree firstly using the original data, and then exchanged the order of Body mass and Plasma glucose which are the strongest/important variables in the growing phase. The second tree is a little different from the first one. The
2007 Nov 22
3
anova planned comparisons/contrasts
Hi, I'm trying to figure out how anova works in R by translating the examples in Sokal And Rohlf's (1995 3rd edition) Biometry. I've hit a snag with planned comparisons, their box 9.4 and section 9.6. It's a basic anova design: treatment <- factor(rep(c("control", "glucose", "fructose", "gluc+fruct",
2010 Mar 09
1
create picture (k -the nearest neighbours)
Hi I want to create a nice picture about my result of k -the nearest neighbours algorithm. Here is my easy code: ################################# library(klaR) library(ipred) library(mlbench) data(PimaIndiansDiabetes2) dane=na.omit(PimaIndiansDiabetes2)[,c(2,5,9)] dane[,2]=log(dane[,2]) dane[,1:2]=scale(dane[,1:2]) zbior.uczacy=sample(1:nrow(dane),nrow(dane)/2,F)
2006 Feb 19
2
changing names of vectors in list or data.frame
When I combine separate vectors into one list, there are new names created. I'd like to change them to something more meaningful. Here are two examples using data(zelazo) from library(ISwR): > library(ISwR) > data(zelazo) > attach(zelazo) > zelazo $active [1] 9.00 9.50 9.75 10.00 13.00 9.50 $passive [1] 11.00 10.00 10.00 11.75 10.50 15.00 $none [1] 11.50 12.00 9.00
2018 May 22
1
Bootstrap and average median squared error
Hello, Right! I copied from the OP's question without thinking about it. Corrected would be 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) } Sorry, rui Barradas On 5/22/2018 11:32 AM, Daniel Nordlund wrote: > On 5/22/2018
2009 Mar 05
1
ANOVA
Hi All, I have about one hundred patients and all the patients had their glucose measured on three different days. The days are all the same for all he patients. So I have three measurement for each patient . I want to know whether the day when the glucose was measured has an effect on the measurements. I was thinking to use a single factor analysis of variance but I am not sure how to do it in
2010 May 13
1
What's data() for?
Hi there, >library(faraway) >pima pregnant glucose diastolic triceps insulin bmi diabetes age test 1 6 148 72 35 0 33.6 0.627 50 1 2 1 85 66 29 0 26.6 0.351 31 0 >data(pima) >pima pregnant glucose diastolic triceps insulin bmi diabetes age test 1 6 148 72 35 0 33.6