# How to predict a discrete dependent variable on a continuous scale using regression

I am trying to find the 'optimal' amount of a certain medicinal cream to be applied to a patient in order to minimize the days the patient has a rash. However, the data for the cream doses are of the values 0, 0.25, 0.5, 0.75, and 1 (on some scale, e.g., 50 milliliters). I am trying to build a regression model using these discrete values and find the optimal value on a continuous scale (i.e. outside these discrete values, [the optimal amount of cream to be applied could be 0.37]). I would also like to be able to predict the number of days a patient has a rash based on a continuous medicinal cream dose input (e.g., if a dose of 0.65 was applied, the patient would have a rash for 4 days)

At present, I am performing regression analysis suitable for continuous dependent variables e.g. lasso regression. Then using the model I have built, I am predicting the number of days a patient has a rash for, using a continuous input to 2 decimal places [0,0.01, 0.02, .... 0.98, 0.99, 1] a large number of times to see which consistently produces the lowest number of rash days.

I am unsure if this is the right approach any confirmation/guidance would be greatly appreciated.

I assume the "dose" $$y$$ is limited to $$y \in [0,1]$$. So in the moment you have "bunching" in your target value $$y$$ which you try to remove. In this case, a linear regression could lead to "overshooting" (see here for more details). So it could be beneficial to use some estimator which "restrics" $$\hat{y} \in [0,1]$$ as well.

This can be achieved using "beta regression". Here is an R implementation, where the docs say:

Fit beta regression models for rates and proportions via maximum likelihood using a parametrization with mean (depending through a link function on the covariates) and precision parameter (called phi).

Example:

library("betareg")
data("GasolineYield", package = "betareg")
summary(GasolineYield\$yield)

Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
0.0280  0.1165  0.1780  0.1966  0.2705  0.4570

br = betareg(yield ~ batch + temp, data = GasolineYield)
preds = predict(br, newdata=GasolineYield)
summary(preds)

Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
0.04571 0.10309 0.16364 0.19655 0.26429 0.50792


The second problem you mention "predicting the number of days..." is not clear to me in the moment. In case the second model is independent from the first one, the approach might be well suited as a sanity check or alternatively to get some high level estimate. However, I guess to test your model in some sence, you would need to look into bootstraping or likely less complicated: cross validation.

• With regards to the second problem, the ultimate goal is to try and build a model that given a dose value between 0 and 1 (to lets say 2 decimal places) can predict the number of days the patient will have a rash for. So do you think it is best to use beta regression and dose as the y variable and then take the inverse of the model to predict the number of days given an inputted dose value (e.g. 0.36)? Jan 5 at 22:19