Displaying 20 results from an estimated 10000 matches similar to: ""Multiple" Regressions indexed by goodness of fit"
2008 Aug 28
1
abline of an lm fit not correct
mac osx 10.5.4
R 2.7.1
I have fit a model
d<-lm(y~x)
with an R^2 of 0.963
but when I issue the command
abline(d)
the line is below where it ought to be. Looks like the right slope,
but not the right intercept.
thanks
--
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy
Let's not spend our time and resources thinking about things that are
so little or so large
2008 Sep 20
1
fitting a hyperbole
I have got a data set that is Gross Primary Productivity ~ Total
Suspended Solids it is a hyperbola just like:
plot(1/c(1:1000))
how do I model this relationship so that I can get all of the neat
things that lm gives residuals etc. etc. so that I can see if my
eyeball model stands up. Thanks for any help, pointers, or good
things to read.
--
Stephen Sefick
Research Scientist
Southeastern
2008 Aug 15
3
ylab with an exponent
plot(1,2, ylab= paste("insects", expression(m^2), sep=" "))
I get insects m^2
I would like m to the 2
what is the problem?
--
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods. We are mammals, and have not exhausted the
annoying little problems of being
2010 Feb 18
3
row indexes from logical statment
Is there any easy way to pull out the row indexes for a logical
matching statment?
#################example code#########################################
foo <- data.frame(name=c(rep("A", 25), rep("B", 25), rep("C", 25),
rep("A", 25)), stuff=rnorm(100), and=rnorm(100), things=rnorm(100))
#this is what I want but I would like the row indexes
2009 Jan 15
3
Bar Plot ggplot2 Filling bars with cross hatching
#I am putting a test together for an introductory biology class and I
would like to put different cross hatching inside of each bar for the
bar plot below
color <- c("Brightly Colored", "Dull", "Neither")
lizards <- c(277, 70, 3)
liz.col <- data.frame(color, lizards)
qplot(color, lizards, data=liz.col, geom="bar", ylab="Observed
Matings",
2008 Jul 15
2
POSIXct extract time
RM215.sp <- SpatialPoints(RM215, proj4string=CRS("+proj=longlat
+datum=WGS84"))
d060101 <- as.POSIXct("2006-01-01", tz="EST")
study_seq <- seq(from=d060101, length.out=761, by="days")
up.215 <- sunriset(RM215.sp, study_seq, direction="sunrise",
POSIXct.out=TRUE)
down.215 <- sunriset(RM215.sp, study_seq, direction="sunset",
2009 Aug 13
3
split number in a vector and then make a chron object out of it
These are date and times in the format YYYYMMDDhhmmss. I would like
to take this column and make a chron object form them. I have tried a
couple of the split family of functions but they need character input
here is the data:
date.time <- c(19851001001500, 19851001003000, 19851001004500, 19851001010000,
19851001011500, 19851001013000, 19851001014500, 19851001020000,
19851001021500,
2008 Jan 21
4
Stationarity of a Time Series
Does anyone know of a test for stationarity of a time series, or like
all ordination techniques it is a qualitative assessment of a
quantitative result. Books, papers, etc. suggestions welcome.
thanks
Stephen
--
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods. We are
2008 Apr 08
3
simple graphing question
#copy and paste this into R
f <- (structure(list(TKN = c(0.103011025, 0.018633208, 0.104235702,
0.074537363, 0.138286096), RM = c(215, 198, 148, 119, 61)), .Names = c("TKN",
"RM"), class = "data.frame", row.names = 25:29))
plot(f$TKN~f$RM, type="b")
I would like to reverse the X-Axis. How do I do this?
--
Let's not spend our time and resources
2008 Dec 02
2
ggplot2 45deg axis labels
I would like to rotate the axis labels 45 deg.
--
Stephen Sefick
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods. We are mammals, and have not exhausted the
annoying little problems of being mammals.
-K. Mullis
2008 Oct 23
1
Reversing xlim qplot
I would like to be able to reverse the xlim on qplot
this is the code that I am using
qplot(a[,"River.Mile"], a[,26]
,ylab=colnames(a)[26], xlab="RiverMile", xlim=rev(c(60,
216)))+geom_smooth()+scale_x_continuous(breaks=c(215,202,198,190,185,179,148,119,61),
2008 Oct 29
1
Macro stuff to work on up through august 2007
Title says it all remember cast() with sum as the aggregation function
--
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods. We are mammals, and have not exhausted the
annoying little problems of being
2009 Jul 23
1
read.csv greater than
I have a csv file that I am trying to read in and know that values <0
are erroneous - is there a way to read only value grater than 0.
thanks,
--
Stephen Sefick
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods. We are mammals, and have not exhausted the
annoying little
2009 Nov 30
2
Ubuntu tcl/tk problems
Error in firstlib(which.lib.loc, package) :
Tcl/Tk support is not available on this system
Error : package 'tcltk' could not be loaded
Ubuntu 9.10
I have both the 8.5 and 8.4 tcl and tk regular and dev libraries
installed. I need both of these because some of my GIS software
requires the 8.4 libraries. Should I remove the 8.5 libraries, or ...
All help is greatly appreciated!
2008 Aug 18
4
Multiple Plotting help (lines don't always connect)
d <- structure(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1,
2, 3, 4, 5, 6, 7, 8, 9, 10, NA, NA, NA, 14), .Dim = c(14L, 2L
), .Dimnames = list(NULL, c("a", "b")))
plot(d, type="b")
This is simplified, but Is there an option I am missing that will
force all of the points to be joined by a line?
Stephen Sefick
--
Let's not spend our time and resources
2008 Nov 09
1
maptools sunrise sunset function
##This is a function that I am trying to write to calculate sunrise
and sunset and works "mostly", but returns nonsensical values. What
am I #missing? Thanks in advance.
###remember to include maptools as dependence###
library(maptools)
sunrise.set <- function(lat, long, date, timezone="UTC", num.days=1){
#this needs to be long lat#
lat.long <- matrix(c(long, lat),
2008 Apr 14
1
Vegan R^2 and tau values for metaMDS
I am using the function metaMDS with jaccard distances to ordinate a
set of constituent by site matrix. I can post this data if it would
be helpful, but it is large to include in an email. I can also
provide reproducable code if necessary. I would like to get an R^2
value for the axes of the ordination configuration that I get with
metaMDS in the vegan package is there a way to do this- is it
2008 Jul 15
0
creating axis of the plot before data are plotted -- solved
Solved. I tried to create a minimal example, but my script is too
complicated to just cut out lines (too many dependencies). Instead of
it, I sketch
my idea. I do not say it is the nicest solution, but it works as I wanted.
The first five rows of my data-matrix:
> data_svd$u[1:5,]
[,1] [,2] [,3] [,4] [,5]
[,6] [,7]
25.12333 -0.05845695
2008 Jul 19
2
extracting colnames to label plots in a function
#this is my little function that I would like to use the column names of the
x and y arguments in the function. I would like it to read
# site1-site2 how would I do this
diff.temp <- function(x, y ,use="pairwise.complete.obs")
{
na.method <- pmatch(use, c("all.obs", "complete.obs",
"pairwise.complete.obs"))
par(mfrow=c(2,1))
2008 Oct 22
1
plotting matrix
a <- c(1:26)
b <- rnorm(25)
e <- rnorm(25)
f <- rnorm(25)
g <- data.frame(b,e, a,f)
I would like to plot a agianst all possibilities and then shoot it out
to a pdf one graph per page. I think it would be okay to have this as
a lattice plot or a ggplot with many graphs per page. I can figure
all of that out I think, but I need something like
r <- as.matrix(g)
plot(.~a, data=r)