Advertisement

Weighted linear regression for calibration curves

Discussions about GC-MS, LC-MS, LC-FTIR, and other "coupled" analytical techniques.

7 posts Page 1 of 1
Hello all,

I have a couple of questions regarding weighted linear regression that i will be using for the calibration curves. Please share your opinions regarding my following questions.

1. Suppose i have an independent variable X (concentration) and a dependent variable Y (peak area). For different values of X and Y, I can obtain a best fit line in Microsoft Excel without using any weighting. How can i obtain a best fit line if i use a weighting scheme such as 1/x , 1/x/x , etc. ? Are there any free Statistical softwares available for drawing these best fit lines?

2. Also, in my research i will be having some baseline value of "Y" when X=0 (for example, for x=0, y = 10 units). In such a case, how is the weighting considered when x=0 ? I have this question because 1/x, 1/x/x cannot be defined when x=0 . How do these statistical softwares consider weighting in such a case? Will these softwares ignore the point (x,y) when x=0? What is the right thing to do in such a scenario?

Please provide information to the concerned questions.

Thanks,
Sai

(1) Excel, as it stands, does not do weighted least squares regressions. However, a quick google search reveals sites such as:
http://vizsage.com/other/leastsquaresexcel/
which give hints and downloads how it might be done. I have not tried this site and cannot endorse whether it's safe, but good luck!

(2) Any chromatography system worth its salt can do weighted least squares, so you should probably do it with the software that came with your hplc (assuming you are not using an old system without software control).

(3) There was a big article in LC-GC a few months ago on how to handle zero points. Generally you cannot handle your X=0 point in the same way as all the others, because the others have a measured value for Y. When concentration = 0 there is no peak to integrate, so there may be merely a missing value (which has no error associated with it). Usually you will be using some sort of threshold for a minimum peak size anyway (otherwise an integrator will pick up noise). The main difficulty associated with zero is whether you should force your calibration curve through zero.

(4) And the answer to this, in LC-GC, appeared to be: if the curve passes within a statistically insignificant distance of zero, it's OK to force it to zero (ie. if you can't tell it isn't zero, you may treat it as zero if you wish). But most methods are only regarded as valid between whichever is higher out of the lowest calibration point and the limit of quantification, and the highest calibration point, so what the calibration curve does at zero should be of little practical interest.

So the practical answer is probably keep your calibration points at reasonable X values, and if you have no hplc software, look at Excel add-ons.

Thank you for your reply.

I am working on quantification of some endogenous compounds (amino acids) in brain tissue using LC-MS/MS. So the blank matrix (brain tissue) already contains the amino acids and so it gives a peak for my analytes of interest. I will build a calibration curve by spiking different concentrations of amino acids (say 1ng/ml, 5ng/ml, 20ng/ml etc.) into the blank matrix (brain tissue). One way to build a calibration curve is to subtract the peak area of blank unspiked sample from the every other spiked samples (1ng/ml, 5 ng/ml, 20ng/ml etc.). I can do this subtraction in excel and apply weighted linear regression program and get the corresponding slope and intercept in Microsoft excel or SPSS (a statistical software). But i want to see the equation of that line in the form of a figure (diagnostic plot) and i cannot get/draw this best fit line in excel or SPSS when weighting is applied. I can get best fit line in excel and SPSS when no weighting is applied. So i was looking for any other statistical softwares that would be useful for this purpose.

The other way is that i should treat my blank unspiked sample as zero concentration because i will not spike any concentration of amino acids and i will include that blank unspiked sample in my calibration curve. I do not want to force my curve through zero because the blank unspiked sample already contains some analytes even at the baseline.


Can you please tell in which edition (volume number ) of LC-GC was this zero concentration topic discussed?

Thanks,
Sai

If I remember correctly, some of us (I certainly did) objected to this forcing through zero if . . . . . What is the difference of this to forcing the line through the other points in the calibration if it is statistically within the prepared value? When you "force" you are saying that you don´t have any measurment variations even though you obviously do, since you have to force.

Sai, what you are doing is the method of standard addition. Are you saying that you have got Excel doing a weighted least-squares fit, but you can't make it plot it? I'm sure you should be able to, even if it means using the output of your regression to produce a set of "data" to plot on the same graph as your real data.

I'm sorry, I can't remember the edition of LC-GC and haven't time to trawl through the back-issues at the moment. Perhaps someone else remembers?

HWMueller; I agree forcing through the origin is dubious. My feeling was that LC-GC were probably on good ground to say that the only situation where it's truly permissible is where there is no statistically significant difference between the y-axis intercept and zero. Of course when this is true, forcing it to zero makes an insignificant difference to the line anyway, so it really becomes rather futile making any change.

Yes, i am doing the method of standard addition. You are right. I got excel that runs weighted-least squares fit, but i can`t make it plot it. I tried it but i could not plot it.


Sai
Spr

This sounds like an Excel problem.
There are various ways to plot it in excel. Here is one, probably not the best:
First plot your data with columns for X and then Y: enter the data, select it, click on insert tab, scatter, choose the version with points but no lines, and accept the resulting graphic.
Calculate the slope and intercept of your weighted line.
Use these values to calculate Y-values corresponding to your known X values for which you already have points.
Now right-click on the points on the graphic, and choose "Select data"
Select "Add", and now fill in the X and Y values of the new series by selecting the original X values and your newly calculated Y values.
Click OK, and get back to the graphic on screen.
Select the new series by left-clicking a marker.
Right click and choose "format data series"
Choose a suitable line, but don't show points.
If you want to extend the line back to the Y-axis, include X=0 at the top of your table of data, and include this line only in the 2nd series, that displaying calculated values, not in the first series displaying experimental points.
7 posts Page 1 of 1

Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 guests (based on users active over the past 5 minutes)
Most users ever online was 4374 on Fri Oct 03, 2025 12:41 am

Users browsing this forum: No registered users and 16 guests

Latest Blog Posts from Separation Science

Separation Science offers free learning from the experts covering methods, applications, webinars, eSeminars, videos, tutorials for users of liquid chromatography, gas chromatography, mass spectrometry, sample preparation and related analytical techniques.

Subscribe to our eNewsletter with daily, weekly or monthly updates: Food & Beverage, Environmental, (Bio)Pharmaceutical, Bioclinical, Liquid Chromatography, Gas Chromatography and Mass Spectrometry.

Liquid Chromatography

Gas Chromatography

Mass Spectrometry