The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Question about Skewed normal distribution
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

neurochick

USA
3 Posts

Posted - 05/27/2014 :  9:55:34 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I've got a problem with skewed normal distribution. I was trying to fit a small data set (24 points) with skewed normal distribution. I tried the lognormal function and it replied me with error -1000 and -206 and the R-square of the fitting is negative. I also tried to write up a new function for a "real" skewed normal distribution, but dont know how to put an integral function in the formula, could you help me with it?

neurochick

USA
3 Posts

Posted - 05/27/2014 :  10:35:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
So I tried the instructions here to generate a new function
http://www.originlab.com/doc/Tutorials/Fitting-Integral-LabTalk
the function of the skewed distribution is like this
y = 1/(w*PI)*exp(-(x-u)^2/2/w^2)*integral(-inf, a*(x-u)/w, intergrand),
the intergrand function is exp(-t^2/2)*dt
The function was generated but I cant get any results from this function fitting. Can anyone help me with this? Thank you.
Go to Top of Page

SeanMao

China
288 Posts

Posted - 05/27/2014 :  11:34:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I tried to define the skew normal distribution function as you have suggested. I found the way you define the function is not appropriate, so I tried myself and rewrote the function y as following:

y=1/(w*PI)*exp(-(x-u)^2/2/w^2)*integral(myintegrand, -inf ,a*(x-u)/w ,a ,u ,w)

where you should have the following script as your definition for integrand “myintegrand”:

return exp(-t^2/2);

There is no “*dt” after the expression but should have “return” in front.

Can you try these steps and see whether the problem gets solved? If it persists, please do not hesitate to ask questions.

Thanks!

Sean

OriginLab Tech. Service

Go to Top of Page

neurochick

USA
3 Posts

Posted - 05/30/2014 :  8:32:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Sean,
Actually I defined the function in the same way as you did, the way I wrote it is just for writing down the original function, I can't type it in on bbs... intergrand in my reply means the expression of the integral . And the result is still the error 207. But thank you for your help anyway.
Go to Top of Page

SeanMao

China
288 Posts

Posted - 06/12/2014 :  06:04:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Sorry for replying so late! It is hard to judge what actually happened on your side, can you post your 24 points dataset in the reply post so that I can try to fit it with the "Skewed normal distribution" defined?

Thanks!

Regards!

Sean

OriginLab Tech. Service
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000