[R] Fitting a half-ellipse curve

From: Niklaus Hurlimann <niklaus.hurlimann_at_unil.ch>
Date: Wed, 29 Sep 2010 15:45:24 +0200


Dear mailing list,

I have following array:

       X2                 Y2

[1,] 422.7900 6.0
[2,] 469.8007 10.5
[3,] 483.9428 11.0
[4,] 532.4917 25.5
[5,] 596.1942 33.5
[6,] 630.8496 40.5
[7,] 733.2996 45.0
[8,] 946.4779 32.0
[9,] 996.8068 35.5
[10,] 1074.3310 23.0

I do afterwards the following:

plot.new()

plot.window(xlim=c(min(X1)-50,max(X1)+50), ylim=c(min(Y1)-25,max(Y1)+25))

axis(2, cex.axis=1.2)
axis(1, cex.axis=1.2)

points(X2, Y2, type="p", pch=0, cex=1.2, col="black")

title(main="Dyke Geometry Along Strike", cex.main=1.2, font.main=4)
title(xlab="distance [m]", cex.lab=1.2)
title(ylab="half-thickness [m]", cex.lab=1.2)

box()

I would like curve fitting where I proceeded with a non linear-regression with the according function below:

nls(formula = Y2 ~ abs(b*abs(1-X2^2/a^2)^(1/2)), start = list( a=282, b=40))

The formula should give the y-positive part of an ellipse in my opinion or I might be completely wrong.

In the end I would like to fit a curve of half an ellipse through the data. I might could do this as well with a 2nd order polynomial fit. I am grateful for any suggestions and comments to my problem.

Cheers

-- 
Niklaus Hürlimann
Doctorant-PhD

Université de Lausanne  
Institut de Minéralogie et Géochimie 
L'Anthropole 
CH-1015 Lausanne 
Suisse

E-mail: Niklaus.Hurlimann_at_unil.ch
Tel:+41(0)21 692 4452 

	[[alternative HTML version deleted]]


______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Received on Wed 29 Sep 2010 - 13:47:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 30 Sep 2010 - 12:00:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive