필터 지우기
필터 지우기

I would like to know how to get coefficients from a norm plot.

조회 수: 1 (최근 30일)
Carlos Martinez
Carlos Martinez 2022년 4월 15일
답변: Moksh 2023년 9월 29일
I am supposed to do a box-cox transformation but instead of using the function I have to do an anova1 test grab the residuals then plot the residuals and take the coefficients from the normal distribution plot.

답변 (1개)

Moksh
Moksh 2023년 9월 29일
Hi Carlos,
I understand that you are performing the transformation without using built-in functions and would like to fetch the normal distribution coefficients from a plot. I am assuming that by the normal distribution coefficients, you are referring to the “mean” and “standard deviation” for the distribution.
You can utilize the 'fitdist' function in MATLAB for plotting the residuals. By passing the 'Normal' parameter along with the data as input, this function will return the best fitting normal distribution object for the data.
Please refer to the following code snippet for using the “fitdist” function:
%% Generating random data (Data you will fetch after plotting the residuals)
data = normrnd(0, 1, 1000, 1);
% Add noise to the data for more randomization of the parameters
data = data + normrnd(0, 0.1, size(data));
% Fit the data to a normal distribution
pd = fitdist(data, 'Normal');
% Get the mean and standard deviation coefficients
mu = pd.mu;
sigma = pd.sigma;
% Display the coefficients
disp(mu);
-0.0057
disp(sigma);
1.0118
For more information about the above-mentioned functions, please refer to the documentation below:
Hope this information helps in solving the issue you were facing.
Best Regards,
Moksh Aggarwal

카테고리

Help CenterFile Exchange에서 Probability Distributions에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by