Fit survival-like data or inversed S-curves - r

I am dealing with some data producing survival-like curves where, instead of time vs survival, I have the log concentration of a substrate against bacterial optical density. The higher the concentration, the lower the OD. And lethal concentration varies with bacterial strain. I am attaching a plot to illustrate all that, where I show five bacterial strains. Each point in the graphic represents three independent replicates. I did not plot them for clarity purposes.
The questions are:
1- Can I use survival and survminer libraries, which are devoted to survival studies?
2- If not, how can I adjust such curves? An alternative would be to focus on the part of the curves where OD starts decreasing, but I do not fancy that idea that much.
Any help would be hugely appreciated.
Best,
David

Related

Interpretation of dispersion between groups using ordihull

I have difficulty interpreting my data in regards to dispersion and composition. I have 6 groups and used adonis2() to test the compositional difference between them. Futhermore, I used betadisper() to check dispersion per group and compared the groups with anova. Now I want to visualize this and an elegant way seemed to use ordihull() in my NMDS plot.
Now my question, can I use ordihull to visualize group dispersion in an NMDS ordination? It looks like this:
Could I interpret and say that groups with largest surface area in ordihull (indicated by the coloured outlining) have the highest dispersion?

Overlap of axis labels

I am conducting a multi level regression model where I look at how house prices vary based on the number of rooms with my level 2 predictor being districts. When I plot the residuals using the dotplot() function I have trouble looking at the variable numbers on the axis because they are too closely spaced together. Any help would be appreciated. Thank you

Probit Regression in R

My question might seem very basic but since am new to R, I am struggling with it. Shall be grateful if I could get some insight...
I need to conduct a probit regression with respect to temperature and people's preference (desire warmer or desire cooler). The preference is therefore my dependent binary variable. I basically desire a plot in which on the y axis there is percentage of respondents desiring warmer/cooler and the x axis has temperature. The plot must therefore have two probit curves- one representing desire warmer and the other curve indicating desire cooler. I am interested at the intersection of the two curves.
Shall be grateful if someone could help me in the R code for the same.

R question: How to compute area under the curve with respect to increase?

I'm looking to illustrate an effect using area under the curve (AUC) in r. Specifically, I need to illustrate the AUC with respect to increase from baseline over 5 days.
I'm looking at biological data where the outcome is not coded as 0,1 but rather as continuous over time. I'm interested in creating this graph described in Fekedulegn et al., 2007 (https://www.ncbi.nlm.nih.gov/pubmed/17766693) with my own data.
I've seen several wonderful packages for AUC so far, but none to compute the AUC with respect to increase from baseline with the exception of one answer, described here: Incremental Area Under the Curve (iAUC) in R). This didn't quite work for my problem though.
The variables are as follows in a long-form dataset:
Baseline: total # of predictive biomarker produced when assessed at baseline
Panel_value: total # of predictive biomarker produced over 5 days (continuous)
Reap: frequency of cognitive reappraisal (continuous), but needed to bin this variable
Reap.quantiles: mutated reappraisal variables to plot values for each quantile
Reap.hilo: mutated reappraisal variable to plot values for those at top and bottom quantile for the frequency of cognitive reappraisal
Day: day of infection
I would greatly appreciate it if anyone can provide insight on any packages to compute AUC with respect to increase from baseline or recommend any alternative methods - bonus points if I can do it in ggplot as plotted here! Thanks in advance!

Removing outliers that are skewing data

I am looking at the relationship between agricultural intensity and functional diversity of birds.
In my GLM model I have included a number of other variables including forest, semi-natural habitat, temperature, pesticides etc.
When looking to see whether my variables are normally distributed or not, I used a QQplot to identify the normality and there appears to be these 3 outliers.
I wondered how I would remove these outliers to make my data more normally distributed?
I tried to use the outliers package but all the examples I found failed to work, or I failed to understand how they worked!
Any help would be appreciated. This is my QQ plot for my functional dispersion model and a scatter of functional dispersion x agricultural intensity.
QQ plot
functional dispersion x agriculture scatter
You could remove the observations that appear out of place. Given the amount of observations, this is unlikely to change estimates, but please make sure this is indeed the case. Also, when reporting your work, make sure you justify why you removed those points based on your domain knowledge about the variable.
You can remove the observation using
model.data.scaled <- model.data.scaled[model.data.scaled$agri > -5, ]

Resources