Skip to content

Regression model fitting

3 messages · Allaisone 1, Eivind K. Dovik, Bert Gunter

#
Hi all ,


I have a dataframe (Hypertension) with following headers :-
ID   Hypertension(before drug A)      Hypertension(On drug A)        On drug B?      Healthy diet?

1            160                                                           90                                           True                  True

2            190                                                          140                                          False                 False

3             170                                                          110                                         True                  False


I wanted to study whether patients on drug A + on drug B + on healthy diet would have better

blood pressure control (reduction) compared to patients with drug A but not on drug B or not on healthy diet or not on both.


I considered my outcome(y) variable to be hypertension measurements for all patients

on drug A (column 2).  Columns 1,3 and 4  are my explanatory(x) variables variables(column 1 is just the baseline measurements to adjust for the effect of drug A compared to the baseline) . So my regression formula using lm() function in R is as follow :-


Regression <- lm (formula= Hypertension(On drug A)~Hypertension(before drug A) +

(On drug B?*Healthy diet?))  , data = Hypertension)


I expect that the result of "(On drug B?*Healthy diet?)" coefficient in the model would give the correct answer to my question.

Is this the best formula to answer my question or there would be better methods ?.


Regards
#
On Fri, 4 May 2018, Allaisone 1 wrote:

            
Hi,

Could you provide R-code that generates your data.frame?

Eivind
#
These is essentially a statistical question, which are generally
consider off topic here. So you may not get a satisfactory reply.

stats.stackexchange.com  is probably a better venue for your post.

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, May 4, 2018 at 8:20 AM, Allaisone 1 <Allaisone1 at hotmail.com> wrote: