-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agregar estimaciones de incertidumbres de errores calculados #183
Comments
de un paper de mossbauer: "A covariance matrix is estimated at the end of fitting, and is then used to calculate the standard deviation of the model parameters. " |
Los error estimates tienen que mostrarse tanto para los parámetros fiteados como para las other calculated quantities: Computing Error Estimates for Derived ParametersWhen you compute derived parameters based on fitted model parameters, you need to propagate the uncertainties from the original parameters to these derived parameters. Follow these steps: Steps to Compute Error Estimates
Practical ExampleAssume you have two original parameters ( \theta_1 ) and ( \theta_2 ) with a variance-covariance matrix: [ And you have a derived parameter ( \alpha = \theta_1 + 2\theta_2 ).
|
no tengo bien claro cómo reportarlo, por lo que no sé si tiene que ir en el archivo exportado de parámetros o podemos informarlo durante el ajuste.
Hago copy paste del chatgpt
Summary
The number in parentheses provides the uncertainty or standard error of the parameter estimate, giving a sense of how precise the estimate is. This notation is particularly useful in scientific and technical fields where reporting the precision and reliability of measurements is crucial.
Practical Example
Suppose you have fitted a Mössbauer spectrum and obtained a parameter value:
This means the fitted parameter is 2.4634 and the associated uncertainty (standard error) is 0.002. Thus, you can infer that the true value of the parameter is expected to lie within the interval 2.4634 ± 0.002.
In MATLAB, the
fitlm
function from the Statistics and Machine Learning Toolbox provides an easy way to fit a linear regression model and compute the variance-covariance matrix of the parameter estimates. However, if you are looking for a built-in MATLAB function that does not require any additional toolbox (e.g., without the Statistics and Machine Learning Toolbox), you would need to compute the variance-covariance matrix manually.Here’s how you can compute the variance-covariance matrix manually using basic MATLAB functions:
Example Using Basic MATLAB Functions
Suppose you have the following data:
Fit a Linear Model:
You can use the basic matrix operations to fit a linear model.
Compute Residuals:
Compute Variance of Residuals:
Compute Variance-Covariance Matrix:
Extract Standard Errors and Confidence Intervals:
Explanation
X \ y
: Computes the least squares solution to the linear system.X' * X
: Computes the cross-product of the design matrix.inv(X' * X)
: Computes the inverse of the cross-product matrix.sigma_squared
: The variance of residuals, used to scale the covariance matrix.cov_matrix
: The variance-covariance matrix of the parameter estimates.Example Code
Here’s the complete example in MATLAB code:
This code provides a manual way to calculate the variance-covariance matrix, standard errors, and confidence intervals for a linear regression model without requiring additional toolboxes.
The text was updated successfully, but these errors were encountered: