vasupserver.blogg.se

Idl linfit
Idl linfit











  1. #IDL LINFIT SOFTWARE#
  2. #IDL LINFIT CODE#

Not only that, but the presented error by R seems multiplied by the "Residual standard error" (almost, it's not really exact). If that happens all the time, I guess I can just divide it by it and then calculate the error from the right covariance matrix. Multiple R-squared: 0.9842, Adjusted R-squared: 0.9685į-statistic: 62.49 on 1 and 1 DF, p-value: 0.08011Īs you can see the covariance matrix from the lm function in R, is multiplied by the square of the "Residual standard error". Residual standard error: 4.913 on 1 degrees of freedom

#IDL LINFIT SOFTWARE#

(Intercept) 3006.640 257.920 11.657 0.0545. The IDL Astronomy Users Library is a central repository for low-level astronomy software written in the commercial language IDL. Lm(formula = y ~ x, data = df, weights = yerror^-2) Result = LINFIT(X, Y, CHISQR=chi2, COVAR=varco, MEASURE_ERRORS=YERROR, SIGMA=sig)Īnd now in R: > lfit = lm(y~x, data=df, weights=yerror^-2)

#IDL LINFIT CODE#

I'm putting the code and the output in both R and IDL to see the differences. I see I can give the weights as a parameter to lm, but what I want is to give the errors we measured. Is there any way to provide this to the lm function in R (or a similar one) but to give the actual errors instead of having R calculating the statistical ones? For instance, something like the LINFIT function from IDL language: Structure(list(x = c(0, 60, 121), y = c(3097.46, 4624.34, 7013.675 1.1 Key steps The key steps are: 1) Read FITS files from the CCD on the 24-inch telescope and display the data using IDL (. That is, I have a physical experiment in which we know the errors for each point, for instance: > df Is there any way to use the linear fit function or R with my own errors instead of the value weights?













Idl linfit