Displaying 20 results from an estimated 5000 matches similar to: "Indifference curve"
2012 Jul 18
4
contour
Hello Everyone
I have the data long format and I want to draw the contour plot with it
x1 x2 x3
0 1 2
0 2 1
0 3 5
1 1 4
1 2 2
1 3 3
when I am using contour(x1,x2,x3,col=heat.colors) or fill.contour
its giving me an error that increasing x and y expected
So please tell me what is the right function to draw contour when the data
is not ordered and you cant order
2012 Jul 04
5
loop for regression
---------- Forwarded message ----------
From: Akhil dua <akhil.dua.12@gmail.com>
Date: Wed, Jul 4, 2012 at 10:33 AM
Subject:
To: r-help@r-project.org
Hi everyone I
have data on stock prices and market indices
and I need to run a seperate regression of every stock on market
so I want to write a "for loop" so that I wont have to write codes again
and again to run the
2012 Aug 02
4
Subseting
Hi everyone
I have banking data set in long format with 4 columns.One of these columns
is bank name which consist of 49 banks and I want the data for only 40
banks out of these 49
so can anyone help me on how to get this 40 banks data
My data looks like
Year Name totalliabilties assets
1990 a 90 10
1991 a 89 48
1992 a 87
2012 Jul 02
2
Heat Maps
Hello Everyone I am new to R
I have drawn indifference curves using the program below (Contour Plot)
u <- function(x, y) x^0.5 + y^0.5
x <- seq(0, 1000, by=1)
y <- seq(0, 1000, by=1)
a <- c(10, 20, 30)
contour(x, y, outer(x, y, u),levels=a,col="blue")
Now can any body please tell me how to draw Heat maps
and that too on the same indifference curve plot (contour)
2012 Jul 04
2
Date
Hi
I have monthly data and the dates are in MM/YY Format
I need to convert them into DD/MM/YY format by pasting 01 in place of DD to
all the observations in my Year Column
ex:
Year Stock Prices
01/2000 1
02/2000 2
03/2000 3
I need to convert them to
Year Stock Prices
01/01/2000 1
01/02/2000 2
01/03/2000
2012 Jul 05
3
Return
Hello Every one
I have data on Stock prices and I want to calculate the return on all the
stocks
and then replace all the stock prices with the returns
can any one tell me how to do
My data is in the format given below
Date Stock1 Stock2 Stock3
01/01/2000 1 2 3
01/02/2000 5 6 7
01/03/2000 1 2 3
01/04/2000
2012 Aug 07
2
shading line plot
Hi everyone,
I have a time series data set and I want to fill my line plot of this time
series with different colors
e.g
I want to fill portion related to 1995-1996 with blue , portion related to
1996-1997 with orange and then portion related to 1997-1998 with red
can anyone please help me.
[[alternative HTML version deleted]]
2012 Jul 04
1
(no subject)
Hi everyone I
have data on stock prices and market indices
and I need to run a seperate regression of every stock on market
so I want to write a "for loop" so that I wont have to write codes again
and again to run the regression...
my data is in the format given below
Date Stock1 Stock2 Stock3 Market
01/01/2000 1 2 3 4
2012 Jul 05
1
Return on Stock Market
Hello Every one
I have data on Stock prices and I want to calculate the return on all the
stocks
and then replace all the stock prices with the returns
can any one tell me how to do
My data is in the format given below
Date Stock1 Stock2 Stock3
01/01/2000 1 2 3
01/02/2000 5 6 7
01/03/2000 1 2 3
01/04/2000
2003 Jul 12
2
help with bivariate density plot question
Dear R users:
I have a dataset with two variables (>20000 observations, two samples from same subject) and I used "kernSur" from library(Genkern) to
get a estimated bivariate density and corresponding plots as follows:
new.data.normal<-data.normal[!is.na(data.normal[,2]),]
x<-new.data.normal[,2]
y<-new.data.normal[,3]
op <- KernSur(x,y, xgridsize=50, ygridsize=50,
2000 Jun 26
1
persp greek label problem (PR#583)
Full_Name: Ramin Nakisa
Version: 1.1.0
OS: i386 linux
Submission from: (NULL) (192.127.94.7)
Labels created with expression seem to disappear, e.g. the x axis label in
x <- -6:16
contour(outer(x, x), method = "edge", vfont = c("sans serif", "plain"),
xlab=expression(theta[0]), ylab=expression(theta[1]))
and all three labels in
x <- -6:16
persp(outer(x, x),
2009 Mar 14
4
persp plot + plotting grid lines
Dear all;
Does anyone know how to add grid lines to a persp plot? I've tried
using lines(trans3d..) but the lines of course are superimposed into
the actual 3d surface and what I need is something like the plot shown
in the following link:
http://thermal.gg.utah.edu/tutorials/matlab/matlab_tutorial.html
I'll appreciate any ideas
Thanks
PM
2005 Feb 16
5
Repeating grey scale in graph?
Dear R users,
Could somebody tell me why the grey color ramp is repeated in this
graph, eventhough the ramp values go from 0 to 1? I must be missing
something obvious, but I can not see it!
z <-
c(0.064329041,0.117243316,0.161565116,0.19923015,0.231642175,0.259835539,0.284571226,
0.038507288,0.094184749,0.140959431,0.180803984,0.215159105,0.245096084,0.271412845,
2007 Sep 10
1
persp() problem
I am having some trouble getting the persp() package to change the x
and y axis on a 3d plot. It defaults to the [0,1] interval and when I
try to change it I get errors.
Example:
This works:
------------
D <- c(1,2,3,4,5,6,7,8,9,10)
M <- c(11,12,13,14,15,16,17,18,19,20)
DM <- cbind(D,M)
persp(DM, theta = 40, phi = 30, expand = 0.5, col = "lightblue",
ltheta = 120,
2004 Aug 10
1
persp, array and colors
Dear R-users,
I'd like to plot a three-dimensional surface and at the meantime I'm using
an array. I would like to have the values of my first matrix in the heights
of the plot and the colors of the single facet taking into account the
second matrix.
I hope that the next code will help all of you to understand better my
issue,
Thanks in advance, Giancarlo
############################
##
2009 Mar 29
2
number of ticks in a persp() plot
Hi, I am trying to specify four ticks (at 0,1,2,3 for the y axis) in a persp
plot but the defaults overrule my specification and I obtain seven of them.
Is it possible to gain full control over them in such a plot? Here is my
code:
matlines=matrix(c(1:7,3:9,3:9,2:8),nrow=7,ncol=4)
2012 Jul 05
1
Adding Text to a persp plot using specific coordinates
Hi folks,
I'm experiencing some hassle to add some text on a persp plot...
Here is the code to generate the persp plot:
x <- seq(-1.95, 1.95, length = 30)
y <- seq(-1.95, 1.95, length = 30)
z <- outer(x, y, function(a,b) a*b^2)
persp(x, y, z,xlim=c(-2,2),ylim=c(-2,2),zlim=c(-8,8), phi=30, theta=-30,nticks=8,ticktype="detailed")
I've tried the text() function :
2006 Sep 28
2
Perspective axes
Is there a way to get the axes labels for a persp() plot to show the
actual values employed? ticktype='detailed' only shows a scale from 0 to
1. My values are (for example) y in 0.2-0.7, x in 450-560 and I would
like to suppress the z labels.
How can I get the x and y values to appear on the plot?
R-2.3.1, Windows XP Home.
Best wishes
John
John Logsdon
2010 May 26
1
persp(); help with 'tck' option
Hi All,
I'm using 'tck' option to *reduce* the length of tick marks but it is not
working, can anyone please tell me where I'm going wrong...
require(graphics)
require(grDevices)
x <- seq(-10, 10, length= 30)
y <- x
f <- function(x,y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
z <- outer(x, y, f)
z[is.na(z)] <- 1
# 'bg' works but 'tck' is not showing
2002 Mar 18
2
persp(): add second plane (second, long question)
Thank you for your replies so far.
Sorry for bothering you again, but I'm still not able to get what I need as
I don't understand all parts of the replies (just using R for easy
things....).
Is there a code for plane3d() like some of you sent me for points3d()? I was
not able to get that out of the scatterplot3d package...
What I can do is to get the x,y and z-range for the xlim,ylim and