search for: xpts

Displaying 6 results from an estimated 6 matches for "xpts".

Did you mean: pts
2011 Jan 26
2
Colour area under density curve
Hello, I have this code to plot a certain normal distribution and represent the pnorm value for a certain "x": x<-300 xx <- seq(2.5,7.5, by=0.1) yy <- dnorm(xx,5.01,0.77) d<-signif(pnorm(log(x), 5.01,0.77),4) xpts <- round(exp(0:8)) par(bg = "antiquewhite") plot(xx,yy, type="l", col="blue", lwd=2, xaxt="n", xlab=expression(ufc/m^3), ylab="Densidad") axis(1, at=log(xpts, base=exp(1)), lab=xpts) n<-0 for (i in 1:(dnorm(log(x), 5.01,0.77)/0.005)){ n<-n...
2009 Jun 02
1
Plot with different x axis
dear, I am trying to plot a standard plot, but I want the x axis to be 1,2,4,8,16 with equal intervals between them on plot. I will appreciate some help. Thank you, Irina Irina Foss Environmental Research Institute North Highland College UHI Millennium Institute Castle Street Thurso, Caithness Scotland KW14 7JD United Kingdom Tel: +44 (0) 1847 889 587 Fax: +44 (0) 1847 890 014
2005 Oct 28
1
Calling R functions from C
...p://www.biostat.jhsph.edu/~rpeng/docs/interface.pdf) that it is possible to use a few R functions (such as "dnorm") within C by including the "Rmath.h" header file in your C code: e.g. #include <R.h> #include <Rmath.h> void kernel_smooth(double *x, int *n, double *xpts, int *nxpts, double *h, double *result) { int i, j; double d, ksum; for(i=0; i < *nxpts; i++) { ksum = 0; for(j=0; j < *n; j++) { d = xpts[i] - x[j]; ksum += dnorm(d / *h, 0, 1, 0); } result[i] = ksum / ((*n) * (*h)); } } In the manual "Writing R extensions" there is also a list o...
2009 Feb 27
1
formula formatting/grammar for regression
Hi all, I am doing some basic regression analysis, and am getting a bit confused on how to enter non-polynomial formulas to be used. For example, consider that I want to find A and r such that the formula y = A*exp(r*x) provides the the best fit to the line y=x on the interval [0,50]. I can set: xpts <- seq(0, 50, by=0.1) ypts <- seq(0, 50, by=0.1) I know I can find a fitted polynomial of a given degree using lm(ypts ~ poly(xpts, degree=5, raw=TRUE)) But am confused on what the formula should be for trying to find a fit to y = A*exp(r*x). If anyone knows of a resource that describes th...
2005 Sep 28
7
Plot Data Points in boxplots
Hello, I would like to plot my data in a fashion similar to a boxplot, but plot the true data points without a box, just overlay lines of the summary generated by the boxplot. I have less than 10 observations within each group, so I think showing the actual data would be more effective than the box of the boxplot. I have been unable to find a way to do this. Here is example data: >
2000 Mar 22
4
density ellipses?
Hello, has anybody written a function to plot density ellipses (95%, 99% or anything) in a scatterplot? I found nothing in any package, nor in the list archives. There does seem to be a contributed package "ellipse" for S-Plus (on S-Archive), but it does a lot more than what I would need. Still, if anybody ported it to R, I'd be grateful for a link. I'm a bit afraid to try the