jranke / chemCal

Calibration Functions for Analytical Chemistry
6 stars 2 forks source link

Allowing weights equal to the length of passed vector #2

Open OmarAshkar opened 1 day ago

OmarAshkar commented 1 day ago

Hello,

I have request if easy to do. When I run

x <- c(1.1,0.99, 0.98,0.98,1.2)
inverse.predict(model, x, ws = 1/x)

this will give me an error as ws length is expected to be 1.

Averaging the weights will shift the prediction interval pretty significantly.

Is there is any work around?

Thanks! Omar

jranke commented 1 day ago

Hi, could you please specify the full data and the code you are using to fit the model?

jranke commented 7 hours ago

I think you can do what you intend to do using the var.s argument. I haven't looked at the code, but the documentation of suggests that I only had in mind a singe sample when implementing ws (weight of sample value).