Re: [R] plotting functions of chi square

2010-08-17 Thread maiya
OK, for the record, this is not my homework, thanks for asking! Also, I am sure I could have phrased my question more eloquently, but (hence the newbie qualifier) I didn't. The code I posted was for the plot I want, only smoothed i.e not based on random sampling from the distribution. Dennis:

Re: [R] plotting functions of chi square

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 5:28 PM, maiya wrote: Thanks, but that wasn't what I was going for. Like I said, I know how to do a simple chi-square density plot with dchisq(). What I'm trying to do is chi-square / degrees of freedom. Hence rchisq(10,i)/i). How do I do that with dchisq? Maybe

Re: [R] plotting functions of chi square

2010-08-17 Thread Ben Bolker
maiya gmail.com> writes: > Thanks, but that wasn't what I was going for. Like I said, I know how to do a > simple chi-square density plot with dchisq(). > > What I'm trying to do is chi-square / degrees of freedom. Hence > rchisq(10,i)/i). > > How do I do that with dchisq? By explicitl

Re: [R] plotting functions of chi square

2010-08-17 Thread Rookie
x <- seq(from = 0, to = 10, by = .01) plot(x, dchisq(x = x, df = 1), main = "title", sub = "subtitle", type = "l", xlab = "x-title", ylab = "y-title", ylim = c(0, .4), col = "red") lines(x, dchisq(x = x, df = 2), type = "l", col = "green") lines(x, dchisq(x = x, df = 3), type = "l", col = "blue")

Re: [R] plotting functions of chi square

2010-08-17 Thread Dennis Murphy
Hi: On Tue, Aug 17, 2010 at 2:28 PM, maiya wrote: > > Thanks, but that wasn't what I was going for. Like I said, I know how to do > a > simple chi-square density plot with dchisq(). > > What I'm trying to do is chi-square / degrees of freedom. Hence > rchisq(10,i)/i). > > How do I do that wi

Re: [R] plotting functions of chi square

2010-08-17 Thread maiya
Thanks, but that wasn't what I was going for. Like I said, I know how to do a simple chi-square density plot with dchisq(). What I'm trying to do is chi-square / degrees of freedom. Hence rchisq(10,i)/i). How do I do that with dchisq? -- View this message in context: http://r.789695.n4.na

Re: [R] plotting functions of chi square

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 4:57 PM, maiya wrote: Hi! This is going to be a real newbie question, but I can't figure it out. I'm trying to plot densities of various functions of chi-square. A simple chi-square plot I can do with dchisq(). But e.g. chi.sq/degrees of freedom I only know how to

[R] plotting functions of chi square

2010-08-17 Thread maiya
Hi! This is going to be a real newbie question, but I can't figure it out. I'm trying to plot densities of various functions of chi-square. A simple chi-square plot I can do with dchisq(). But e.g. chi.sq/degrees of freedom I only know how to do using density(rchisq()/df). For example: plot(1,