similar to: plotting least-squares residuals against x-axis

Displaying 20 results from an estimated 5000 matches similar to: "plotting least-squares residuals against x-axis"

2009 Sep 20
3
plotting least-squares regression against x-axis
Hi, I want to plot the residuals of a least-squares regression. plot(lm(y~x), which=1) does this, but it plots the y-axis of my data on the x-axis of the residuals plot. That is, it plots the residual for each y-value in the data. Can I instead use the x-axis of my data as the x-axis of the residuals plot, showing the residual for a given x? Thanks! Jason Priem University of North
2009 Nov 01
3
counting frequencies across two columns
I've got a data frame describing comments on an electronic journal, wherein each row is a unique comment, like so: commentID author articleID 1 1 smith 2 2 2 jones 3 3 3 andrews 2 4 4 jones 1 5 5 johnson 3 6 6 smith 2 I want know the number of unique authors per article. I can get a
2009 Aug 31
3
Two way joining vs heatmap
Hi STATISTICA has a function called "Two-way joining" (see http://www.statsoft.com/TEXTBOOK/stcluan.html#twotwo) and the reference material states that this is based on the method as published by Hartigan (found this paper: http://www.jstor.org/pss/2284710 through wikipedia). What is the relationship (if any) between the "heatmap" function in R and this technique? Is there an
2009 Jan 22
2
Standard errors of least squares adjusted means
Hello, I have the following model: lm.7 <- lm(Y ~ F + C1 + C2 , data = EM4) F is a 4-level factor, the rest are covariates centered at their mean (Y is a two-column matrix). I have tried to find functions to give the model-adjusted means (adjusted at the covariates'means) and their standard deviations for each. (That is, what I believe is called in SAS "least square or LS-means,
2010 May 25
1
Cohen's Kappa for beginners
Hi, I've got two vectors with ratings from two coders, like this: x<-c("red", "yellow", "blue", "red") #coder number 1 y<-c("red", "blue", "blue", "red") #coder number 2 I want to find Cohen's Kappa using the wkappa function in the psych package. The only example in the docs is using a matrix, which
2009 Sep 14
3
Question about Factors
Hi all, I am new to R and I have got a question in regards to factors. Say I have a simple dataset like the following: Name Time Value a 1:00 1.25 a 2:00 1.26 b 1:00 1.29 b 2:00 1.28 c 1:00 1.21 c 1:30 1.20 c 2:00 1.23 I want to write a script that automatically plot value against time for a, b and c.
2014 Oct 01
3
[LLVMdev] need help on llvm support for Chapel
Hello, I don't know if anyone gets familiar with the llvm Chapel front end, it's version 3.3 and comes within Chapel source package. I'm trying to parse the .bc code generated from a simple helloworld chapel program. Just run a basic Hello pass on the code (default one in the llvm source code) that prints out all the function names in the module. However, it prints a bunch of
2009 Sep 09
1
Combining simulated data
R helpers   Please help me combine the simulated data to a form of table where: Hypermarket have 10 rows, supermarket have 15 rows,......., spazashops with 35 rows.   Hypermarket <- rnorm(10, mean=20000, sd=7000) Supermarket <- rnorm(15, mean=12000, sd=4000) Minimarket   <- rnorm(20, mean=10000, sd=4000) Cornershop  <- rnorm(20, mean= 8000, sd=3000) Spazashop   <- rnorm(35, mean=
2009 Sep 13
2
(no subject)
How would I make a histogram using R from a table in excel that has 4 variables, but I only want to use 2 of the columns to make the histogram? [[alternative HTML version deleted]]
2009 Sep 15
1
comma as decimal separator in xtable
Hello, How can I make xtable print a comma as decimal separator? Setting the option OutDec isn't enough for xtable: library(xtable) options(OutDec = ",") x <- c(1.1, 1.2, 1.3) y <- c(2.3, 2.2, 2.1) d <- data.frame(x, y) d print(xtable(d)) Thanks! Jakson Aquino
2009 Sep 16
1
list of symbols to substitution
Hi, I'm trying to use a list of symbols as one of the values to be substituted in a substitute expression, but I can't figure out how to write the correct expression for my problem. Let me illustrate a simple example of what I'm trying to do. The following code snippet will evaluate to '5': symname <- 'foo' foo <- 5 expr <- substitute(c(expr), list(expr =
2009 Sep 17
1
How to extract data.frame columns using regex?
Hi, data.frame(x1=1:11,x2=2:12,x3=3:13,y=4:14) I want to extract all the columns that with the name 'x?'. Is there a general way to do this in R? Regards, Peng
2009 Sep 19
1
random selection from dataset and creating and graphing multiple means
I was wondering if anyone could help me with a problem. I need to randomly select, say 500 subjects from the 5000 cases I have and then need to run a test to create 500 sample means and graph the means in a histogram. Does anyone know how to do this. I'm not that familiar with R so please be patient with me. Thanks a lot! Mike Hollingsworth -- View this message in context:
2009 Sep 23
1
set choose.files directory?
Hi, I've been trying to set the directory for choose.files as follows: [R2.9.0 running on XP] setwd("C:/Documents and Settings/2/Data") getwd() infile2 = choose.files(filters = Filters[c("txt","All"),], caption = "Choose ECD datafile") #<...do a bunch of stuff...> It appears the working directory isn't updated until after choose.files()
2009 Oct 12
1
field index given name.
Hi, How do I access the index number of a field given I only know the field name? eg - I want to set the probability of the field 'species' higher than the other fields to use in sampling. > colprob <- array(dim=NCOL(iris)) > for(i in 1:NCOL(iris)){colprob[i]=0.5} > colprob[iris$species] = 1 #this doesn't work > colprob [1] 0.5 0.5 0.5 0.5 0.5 -- View this
2009 Sep 09
2
vector of Vectors
I just learned that vectors can't contain vectors, which frankly simply confuses me (can you imagine arrays or lists in any other language not being able to contain arrays or lists?). At any rate, I need to create a data structure (size to be determined at runtime) which I will instantiate and then fill with vectors using a for loop. Clearly I'm new to the R game. Data Frame doesnt seem to
2009 Sep 17
1
heatmap.2() problems with re-ordering of rows and columns
I have a file of the following form -11 -10 -9 -8 -10 -9 -8 NA -9 -7 NA NA -8 NA NA NA So basically a NxN matrix of log scores. I want to get a heatmap of these log scores but I'm having a problem. I'm using the following code library(gplots) data=read.table("filein.txt",header=FALSE) mat=as.matrix(data) heatmap.2(mat,dendrogram=c("none")) But on the
2009 Nov 16
2
test for causality
Hi useRs.. I cant figure out how to test for causality using causality() in vars package I have two datasets (A, B) and i want to test if A (Granger)cause B. How do I write the script? I dont understand ?causality. How do I get x to "contain" A and B. Further using the command VAR() to specify x, I dont either understand. Kind regards Tobias -- View this message in context:
2009 Sep 21
1
Specific criteria for color palette using heatmap.2
I'm trying to display the probability space of a function and wanted to see specifically where the maximum posterior probability is. data=read.table("PosteriorData",header=F) mat=as.matrix(data) heatmap.2(mat/max(mat,na.rm=T),dendrogram=c("none"),trace=c("none"), Rowv=F,Colv=F,labRow=3*c(10:-10),labCol=3*c(-10:10),symm=T,col=rainbow(100)) As the
2009 Sep 21
1
Three dimensional view of the profiles using 'rgl' package (example of 3 dimensional graphics using rgl package).
Hi there, Anyone has an idea how to put those two sets of code together so that I can get a 3-dimensional picture that includes points instead of 2 separate pictures which doesnt make that much sense at the end. #Let's say that these are the data we would like to plot: A<-c(62,84,53) B<-c(64,82,55) C<-c(56,74,41) D<-c(46,68,38) E<-c(71,98,72) data<-rbind(A,B,C,D,E)