Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: Predicting sdres in Stata


From   "Seed, Paul" <paul.seed@kcl.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Predicting sdres in Stata
Date   Fri, 22 Jul 2011 09:29:28 +0100

Dear Statalist, 

Lars responded to me directly.  
I am sending his message & reply directly to Statalist.
 

Lars, 
I suggest you read the Statalist FAQ.
Standard practice is to keep all the discussion public, 
in case others are following the discussion & would benefit.

You say you have two groups of subjects; but your code suggests that 
you have measurements by two different methods on one group of subjects.

The issues are totally different in the two cases.

In the first case, you can use multiple regression:
All you need is:
	regress depenVar BSA group, vce(robust)

In the second case, you are comparing methods of measurement, not 
groups of subjects.  The BSA scores are irrelevant, because 
they are the same for each pair of measurements.

i)  You would be well advised to read Bland & Altman's classic 
paper: Bland, J. Martin and Altman, Douglas G.  Statistical 
methods for assessing agreement between two methods of clinical 
measurement. Lancet, 1986; i: 307-310.  A Google search should 
turn up a copy.  

ii) Read it again.  It really is that good.

iii) The simplest way to perform Bland-Altman plots in Stata is 
by using the user-written command -baplot-

Type 
	findit baplot

and follow the blue links. That should place a copy 
ready to use on your computer.  You do not need administrator rights.
Then type 
	help baplot 
to find out how to use it.

	baplot depenVar1 depenVar2

There is an alternative, -batplot-, which should be used with the 
-notrend- option:

	batplot depenVar1 depenVar2, notrend



Paul T Seed, Senior Lecturer in Medical Statistics, 
Division of Women's Health, King's College London and King's Health Partners
020 7188 3642.






-----Original Message-----
From: Lars Folkestad [mailto:lfolkestad@health.sdu.dk] 
Sent: 21 July 2011 10:48
To: Seed, Paul
Subject: Re: st: Predicting sdres in Stata

Dear Paul
Thank you very much for this.

I have a last question, and i feel stupid for asking it, so I'm sending it
straight to you. 

When i predict adjdepenVar1 using the xb option post regression, i am
getting the BSA adjusted variable right?

My problem is: I want to ensure that the difference in BMD between two
groups is not due to BSA difference alone.

Doing the regression and predicting an adjustedBMD variable and then doing a
ttest for between group differences and getting a p-value of below 0.05 will
render this statement true, the differences between the two groups are NOT
due to the differences in BSA alone.

If this falls into the category of spam - just put the mail straight in the
bin.

Thank you anyway for your help.

Best. 
lars

Den 21/07/11 11.31 skrev "Seed, Paul" <paul.seed@kcl.ac.uk> følgende:

> Dear Statalist, 
> Using the regression, Lars can divide the
> outcome var into two parts: the predicted part (due to BME)
> and the residual, adjusted for BME, in which he is interested.
> 
> He needs to drop the robust VCE from the regression equation.
> Then he can predict the residuals. As he is interested in the
> estimates, not the SE, he loses nothing by this.
> 
> Incidentally, the reason his first attempt produced identical
> results when using -swilk- and -qnorm-
> is that the predicted values he was using are
> a_1 + b_1*BSA
> and  
> a_2 + b_2*BSA
> These are linear transformations of BSA,
> with identically shaped distributions, and correlations with
> each other and BSA = 1.
> Nothing of the dependent variables (depenVar1 and depenVar2)
> is used.
> 
> 
> 
> ***************************
> regress depenVar1 BSA
> 
> predict sdres, resid
> qnorm sdres
> swilk sdres
> predict adjdepenVar1
> drop sdres
> 
> regress depenVar2 BSA
> predict sdres, resid
> qnorm sdres
> swilk sdres
> **************************************
> 
> 
> 
> Paul T Seed, Senior Lecturer in Medical Statistics,
> Division of Women's Health, King's College London and King's Health Partners
> 020 7188 3642.
> 
> 
> 
> On 7/20/11 8:05 AM, Lars Folkestad wrote:
>> Hi Stata Listers
>> 
>> This is probably a simple question for you all. I just cannot see my way
>> through it.
>> 
>> I am doing liniar regression for different variables as a way to adjust for
>> Body Surface Area. I do the following
>> 
>> . regress depenVar1 BSA, vce(robust)
>> . predict sdres
>> . qnorm sdres
>> . swilk sdres
>> . predict adjdepenVar1
>> . drop sdres
>> 
>> . regress depenVar2 BSA, vce(robust)
>> . predict sdres
>> . qnorm sdres
>> . swilk sdres
>> 
>> The two swilks tests give the exact same p-value and the qnorm graf is
>> identical.
>> 
>> I cannot understand how. For your information i am new to stata and
>> regression and my statistically knowledge is low.
>> 
>> Why is the two swilks tests and qnorms the same?
>> 
>> lars
> 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/


--
Lars Folkestad
Læge, PhD-studerende
Endokrinologisk Afdeling M / Endokrinologisk afdeling / Klinisk Institut
Odense Universitets Hospital / Sydvestjysk Sygehus Esbjerg / Syddansk
Universitet





*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index