1
votes

Please again accept my apologies for my little knowledge in R. I'm, trying to get better! I'm a biologist and my statistical knowledge is sadly low

I have the following data set:

Perc_Reacting,Pulses,IndMutant,Proportion
93,1,1,0.93
81,2,1,0.81
73,3,1,0.73
64,4,1,0.64
73,5,1,0.73
68,6,1,0.68
64,7,1,0.64
65,8,1,0.65
50,9,1,0.5
68,10,1,0.68
57,11,1,0.57
50,12,1,0.5
62,13,1,0.62
44,14,1,0.44
54,15,1,0.54
56,16,1,0.56
50,17,1,0.5
42,18,1,0.42
42,19,1,0.42
29,20,1,0.29
96,1,0,0.96
100,2,0,1
92,3,0,0.92
96,4,0,0.96
92,5,0,0.92
92,6,0,0.92
84,7,0,0.84
96,8,0,0.96
91,9,0,0.91
82,10,0,0.82
86,11,0,0.86
82,12,0,0.82
91,13,0,0.91
85,14,0,0.85
83,15,0,0.83
70,16,0,0.7
74,17,0,0.74
64,18,0,0.64
68,19,0,0.68
78,20,0,0.78

The first and last rows are the same, one expressed in % an the other in a 1-0 proportion

I need to run a Beta regression model, but when I try to create the model an error jumps:

model.beta<-betareg(C_elegans$Proportion~C_elegans$Pulses)

Error in betareg(C_elegans$Proportion ~ C_elegans$Pulses) : invalid dependent variable, all observations must be in (0, 1)

Could you help me to create a beta regression model for this data and how to make relevant plots to show it fits good?

Also I need to propose a linear regression model for this data, can anyone let me know how you think it could be done better?

1
Beta regression only allows values in the open interval (0,1). The issue is that you have a proportion value of exactly 1. - Roland
thanks roland! and how can I fix it? removing that row? or is there any other way? - Storm Wiston
I am not so sure you have enough data points to estimate the parameters for a beta-binomial. If your aim is to see whether there is a difference between mutant = 0 vs mutant =1, you can just use a binomial? - StupidWolf
Or do you have reasons to suspect there is a mixture of rate of proportions? - StupidWolf
There are two strains one mutated one WT, they react different to a given independant variable (pulses) and respond or not to it (of a number of pulses they will give a response in 80% of the cases... etc, how do I find a model to predict their activity? - Storm Wiston

1 Answers

0
votes

Here are the results of fitting the last three columns to a flat surface plane equation "Proportion = a + (b * Pulses) + (c * IndMutant)" with parameters a = 1.0468289473684214E+00, b = -1.8650375939849695E-02, and c = -2.5850000000000006E-01 yielding R-squared = 0.876 and RMSE = 0.064.

scatter plot

surface plot

error plot (here "absolute error" means "not relative error")