Re: [R] fitting a gaussian to some x,y data

From: MARK LEEDS <markleeds_at_verizon.net>
Date: Sat 26 Aug 2006 - 06:35:14 EST

hi michael : ( i stupidly didn't send the initial email to the whole list so they will have to read from the bottom ), it's clearer now but "fitting a gaussian" still may not be the right thing to do in this case. someone else can answer better but it sounds to me like you want to do some kind of regression ( i dont know whether it would be linear or glm or what ) using distance versus brightness.
i have no clue about astronomy but if you think there is a relationship between them then this is probably the more appropriate approach to take. again, don't take my word in stone. someone else will likely reply.

> Thank you. Yes, I do feel that I am under-qualified to even ask
> questions of y'all. Plus I'm an astronomer, which doesn't help! ;)
> I'll try again.
>
> I have two columns of data, the first column (x) is a distance (or
> length or separation) and the second column (y) is a flux (or number
> of counts or brightness) at that distance. Thus, when you plot y vs.
> x you get a spatial profile which shows how bright this thing is as a
> function of position. (See the small, attached PNG file. You can see
> there is a vague gaussian shape to the data.) This is measured data
> from a bizarre technique which yields data that is not evenly-spaced
> in x and it does not represent a pure mathematical function (i.e. it
> is not a point spread function or something like that), it represents
> the actual, non-uniform shape of an astronomical object. We are
> making the assumption that the shape of this object can be roughly
> represented with a gaussian.
>
> I want to fit a gaussian to this with the purpose of determining
> systematically the "center" of the normal-like shape of the spatial
> feature. I have successfully done so in R with a polynomial but I
> can't figure out how to do it with a gaussian.
>
> Does that make sense?
>
> Thanks!
> Michael
>
>
> On Aug 25, 2006, at 2:04 PM, MARK LEEDS wrote:
>
>> hi : i'm not clear on what you mean but someone else might be ? if you
>> say ( x,y), then it sounds like you are talking about a bivariate
>> normal
>> distribution. to fit a regular one dimensional gaussian distribution,
>> you can't have 2 dimensional data. i honestly don't mean to sound
>> rude but
>> i think you should explain what you want to do more clearly
>> because I don't think
>> I am the only one that will be confused by what you said.
>> send out a clearer email and you will get quite a response because
>> there are a lot of really smart people ( compared to me ) on this
>> list that love to help.
>> it's an amazing list in that sense.
>
>
>


> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>



R-help@stat.math.ethz.ch 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 Sat Aug 26 07:01:53 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 26 Aug 2006 - 08:29:52 EST.

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