Skip to content
Back to formatted view

Raw Message

Message-ID: <alpine.LFD.2.20.1805041957440.1703@localhost>
Date: 2018-05-04T18:00:47Z
From: Eivind K. Dovik
Subject: Regression model fitting
In-Reply-To: <DB5PR02MB0904BA32D25EFC486293413280860@DB5PR02MB0904.eurprd02.prod.outlook.com>

On Fri, 4 May 2018, Allaisone 1 wrote:

>
> Hi all ,
>
>
> I have a dataframe (Hypertension) with following headers :-
>
>
>> Hypertension
>
> 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
>

Hi,

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

Eivind


>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>