similar to: Std. errors of intercept and slope

Displaying 20 results from an estimated 300 matches similar to: "Std. errors of intercept and slope"

2007 Oct 29
1
lm.boot function gives error
When I run this calculation library(ISwR) library(simple.boot) data(thuesen) fit <- lm(thuesen$short.velocity~thuesen$blood.glucose) summary(fit) fit.sb <- lm.boot(fit,R=1000,rows=F) summary(fit.sb) I get the following error from the lm.boot routine: newdata' had 100 rows but variable(s) found have 24 rows I don't know what this error means. Also, this example is
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)
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
2004 Apr 29
5
Problems in plot
Hello, I have R1.9.0 under Windows XP. My program plots several plots using x11() par(cex = 0.75) ...... x11() par(cex = 0.75) ...... x11() par(cex = 0.75) ...... x11() par(cex = 0.75) ...... Sometimes, one of them generates a small frame only with title area "R graphics: Device X (ACTIVE)". The message in the console window is Error in plot.new() : Figure margins too large
2003 Sep 16
3
Question in Using sink function
Could anyone please explain to me why the following writes nothing into "all.Rout" file? If the "for" loop is removed, t.test output can be written into "all.out". Thanks in advance. Minghua Yao ...... zz <- file("all.Rout", open="wt") sink(zz) for(i in 1:n) { Cy3<-X[,2*i-1]; Cy5<-X[,2*i]; t.test(Cy3, Cy5)
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
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,
2003 Apr 10
3
A Question on lowess() function
Hi, all, I want to use lowess(x, y) where x and y are vectors of length of 4000+. In fact, x and y are log of some vectors. So, some of the elements are NaN. lowess() can not take away those elements then do the fitting. It will give the error message and do nothing. 1. Can anybody tell me how to get rid of those NaN's and use lowess()? 2. How to get the LOWESS fitting values for any
2003 Apr 07
3
New window for plot()
Hi, Can anybody tell me how to open new a new window for plot()? Thanks. Minghua
2004 Aug 25
5
How to Arrange character vector in alphabetic order
Hi, Is there any function that can arrange a character in alphabetic order? Thanks for answer -MY [[alternative HTML version deleted]]
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
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
2003 Jun 27
2
NA points in loess function
Gurus, I used predict(loess(Y~X)); where Y and X are of the same length. But there are same NA's in both Y and X. Those NA's are in the same locations in Y and X. The following is the error messageI got: Error in "[<-"(*tmp*, , i, value = predict(loess(Y~X))) : number of items to replace is not a multiple of replacement length If I replaced the NA's with a
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)
2004 May 20
2
Get Slot from a Class
Hello, everyone, I don't quite understand the following message: > TTT <- t.test(1:10, y=c(7:20)) > class(TTT) [1] "htest" > TTT@p.value Error: Trying to get slot "p.value" from an object whose class ("htest") is not defined > TTT$p.value [1] 1.855282e-05 Why the message says the class of TTT is not defined while class(TTT) gets
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 <-
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",
2004 Aug 20
3
How generate "A01", "A02", ..., "A99"?
Hi, Anyone can tell me how to generate "A01", "A02", ..., "A99"? paste("A", 1:99, sep="") generates "A1", "A2",..., "A99". This is not what I want. Thanks for the help. -MY [[alternative HTML version deleted]]
2003 Apr 21
2
How to assigen column of matrix
Hi, A simple question. I want to assign values to columns (or rows) of a matrix. It seems that AA[,i]<-A; # A is a vector or array; doesn't work. How can I accomplish that? Thanks alot. -MY
2003 Aug 06
3
How to copy and paste a R plot onto Word (or Power Point)
All, Anybody can tell how to export a R plot onto Word (or Power Point)? Many thanks in advance. -MY