Quantcast

p-value for the fitted parameters in linear models

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

p-value for the fitted parameters in linear models

Li Sun-2
Hi All,

when using the linear model lm() to fit data of the form y = k * x +
b, is it possible to know the p-value for the parameters k and b? i.e.
can we find the result of the form (k, Δk; b, Δb)?

Thanks in advance!

Li Sun

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: p-value for the fitted parameters in linear models

Uwe Ligges-3


On 24.06.2012 17:47, Li SUN wrote:
> Hi All,
>
> when using the linear model lm() to fit data of the form y = k * x +
> b, is it possible to know the p-value for the parameters k and b? i.e.
> can we find the result of the form (k, Δk; b, Δb)?

If you explain what Δk means in a linear model, we may be able to help.
Also, what is "the p-value of the parameters"? Obviously a hypothesis is
missing in this sentence.

Best,
Uwe Ligges




>
> Thanks in advance!
>
> Li Sun
>
> ______________________________________________
> [hidden email] mailing list
> 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.
>

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: p-value for the fitted parameters in linear models

Li Sun-2
Sorry for the confusion.

Let me state the question again. I missed something in my original statement.

When using the linear model lm() to fit data of the form y = k * x +
b, where k, b are the coefficients to be found, and x is the variable
and has an error bar (uncertainty) Δx of the same length associated
with it. Is it possible to pass Δx to the linear model lm(), and from
the output to find the uncertainty Δk for k, Δb for b as well?

Li Sun



2012/6/24 Uwe Ligges <[hidden email]>:

>
>
> On 24.06.2012 17:47, Li SUN wrote:
>>
>> Hi All,
>>
>> when using the linear model lm() to fit data of the form y = k * x +
>> b, is it possible to know the p-value for the parameters k and b? i.e.
>> can we find the result of the form (k, Δk; b, Δb)?
>
>
> If you explain what Δk means in a linear model, we may be able to help.
> Also, what is "the p-value of the parameters"? Obviously a hypothesis is
> missing in this sentence.
>
> Best,
> Uwe Ligges
>
>
>
>
>>
>> Thanks in advance!
>>
>> Li Sun
>>
>> ______________________________________________
>> [hidden email] mailing list
>> 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.
>>
>

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: p-value for the fitted parameters in linear models

David Winsemius

On Jun 24, 2012, at 1:21 PM, Li SUN wrote:

> Sorry for the confusion.
>
> Let me state the question again. I missed something in my original  
> statement.
>
> When using the linear model lm() to fit data of the form y = k * x +
> b, where k, b are the coefficients to be found, and x is the variable
> and has an error bar (uncertainty) Δx of the same length associated
> with it. Is it possible to pass Δx to the linear model lm(), and from
> the output to find the uncertainty Δk for k, Δb for b as well?

In one sense this could be done if you were interpreting the "Δx" as  
the vector of individual residuals of a model, but I'm guessing that  
might not be what you meant. You would be able to recover the original  
data, assuming you knew the X values, and would proceed by calculating  
the Y values as the sum of predictions and the residuals, thus  
recovering the original data. But  I'm guessing you want to supply a  
small number of parameters from an analysis you are reading about and  
you are hoping to be getting from lm() further information to answer  
some question. That's not the direction of teh flow of information.  
The flow is data INTO lm(), estimation of parameters OUT.

Show us a sample dataset constructed with R code or show us the  
console output of dput() applied to your dataset, and you may get  
better answers to what is still an unclear question.

--
David.

>
> Li Sun
>
>
>
> 2012/6/24 Uwe Ligges <[hidden email]>:
>>
>>
>> On 24.06.2012 17:47, Li SUN wrote:
>>>
>>> Hi All,
>>>
>>> when using the linear model lm() to fit data of the form y = k * x +
>>> b, is it possible to know the p-value for the parameters k and b?  
>>> i.e.
>>> can we find the result of the form (k, Δk; b, Δb)?
>>
>>
>> If you explain what Δk means in a linear model, we may be able to  
>> help.
>> Also, what is "the p-value of the parameters"? Obviously a  
>> hypothesis is
>> missing in this sentence.
>>
>> Best,
>> Uwe Ligges
>>
>>
>>
>>
>>>
>>> Thanks in advance!
>>>
>>> Li Sun
>>>
>>> ______________________________________________
>>> [hidden email] mailing list
>>> 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.
>>>
>>
>
> ______________________________________________
> [hidden email] mailing list
> 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.

David Winsemius, MD
West Hartford, CT

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: p-value for the fitted parameters in linear models

Prof Brian Ripley
On 24/06/2012 18:39, David Winsemius wrote:

>
> On Jun 24, 2012, at 1:21 PM, Li SUN wrote:
>
>> Sorry for the confusion.
>>
>> Let me state the question again. I missed something in my original
>> statement.
>>
>> When using the linear model lm() to fit data of the form y = k * x +
>> b, where k, b are the coefficients to be found, and x is the variable
>> and has an error bar (uncertainty) Δx of the same length associated
>> with it. Is it possible to pass Δx to the linear model lm(), and from
>> the output to find the uncertainty Δk for k, Δb for b as well?
>
> In one sense this could be done if you were interpreting the "Δx" as the
> vector of individual residuals of a model, but I'm guessing that might
> not be what you meant. You would be able to recover the original data,
> assuming you knew the X values, and would proceed by calculating the Y
> values as the sum of predictions and the residuals, thus recovering the
> original data. But  I'm guessing you want to supply a small number of
> parameters from an analysis you are reading about and you are hoping to
> be getting from lm() further information to answer some question. That's
> not the direction of teh flow of information. The flow is data INTO
> lm(), estimation of parameters OUT.
>
> Show us a sample dataset constructed with R code or show us the console
> output of dput() applied to your dataset, and you may get better answers
> to what is still an unclear question.
>

This is not linear regression if 'x' is not known exactly.  There are
various formulations of the problem, but that is off-topic here.
However, consulting

@Book{Fuller.87,
   author       = "Fuller, Wayne A.",
   title        = "Measurement Error Models",
   publisher    = "John Wiley and Sons",
   address =      "New York",
   year         = "1987",
   ISBN         = "0-471-86187-1",
}

would be a good start.

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: p-value for the fitted parameters in linear models

Li Sun-2
Thanks David and Brian.

But what if x is exact while y has some uncertainty Δy, in the
relation y = k * x + b?

Now I need to fit some data like
x       = 1,          2,          3,          4,          5
y±Δy = 1.1±0.1, 2.0±0.2, 3.1±0.2, 4.1±0.1, 5.0±0.2

Is there any mechanism to pass x, y and Δy to lm() so that I can find
k, b as well as their uncertainties Δk, Δb?


Li Sun


2012/6/24 Prof Brian Ripley <[hidden email]>:

> On 24/06/2012 18:39, David Winsemius wrote:
>>
>>
>> On Jun 24, 2012, at 1:21 PM, Li SUN wrote:
>>
>>> Sorry for the confusion.
>>>
>>> Let me state the question again. I missed something in my original
>>> statement.
>>>
>>> When using the linear model lm() to fit data of the form y = k * x +
>>> b, where k, b are the coefficients to be found, and x is the variable
>>> and has an error bar (uncertainty) Δx of the same length associated
>>> with it. Is it possible to pass Δx to the linear model lm(), and from
>>> the output to find the uncertainty Δk for k, Δb for b as well?
>>
>>
>> In one sense this could be done if you were interpreting the "Δx" as the
>> vector of individual residuals of a model, but I'm guessing that might
>> not be what you meant. You would be able to recover the original data,
>> assuming you knew the X values, and would proceed by calculating the Y
>> values as the sum of predictions and the residuals, thus recovering the
>> original data. But  I'm guessing you want to supply a small number of
>> parameters from an analysis you are reading about and you are hoping to
>> be getting from lm() further information to answer some question. That's
>> not the direction of teh flow of information. The flow is data INTO
>> lm(), estimation of parameters OUT.
>>
>> Show us a sample dataset constructed with R code or show us the console
>> output of dput() applied to your dataset, and you may get better answers
>> to what is still an unclear question.
>>
>
> This is not linear regression if 'x' is not known exactly.  There are
> various formulations of the problem, but that is off-topic here. However,
> consulting
>
> @Book{Fuller.87,
>  author       = "Fuller, Wayne A.",
>  title        = "Measurement Error Models",
>  publisher    = "John Wiley and Sons",
>  address =      "New York",
>  year         = "1987",
>  ISBN         = "0-471-86187-1",
> }
>
> would be a good start.
>
> --
> Brian D. Ripley,                  [hidden email]
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
>
> ______________________________________________
> [hidden email] mailing list
> 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.

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: p-value for the fitted parameters in linear models

Uwe Ligges-3


On 24.06.2012 20:35, Li SUN wrote:

> Thanks David and Brian.
>
> But what if x is exact while y has some uncertainty Δy, in the
> relation y = k * x + b?
>
> Now I need to fit some data like
> x       = 1,          2,          3,          4,          5
> y±Δy = 1.1±0.1, 2.0±0.2, 3.1±0.2, 4.1±0.1, 5.0±0.2
>
> Is there any mechanism to pass x, y and Δy to lm() so that I can find
> k, b as well as their uncertainties Δk, Δb?

Again, no: this is not a linear model. Assumption in a linear model is
that the errors are identically distributed.

Uwe Ligges



>
>
> Li Sun
>
>
> 2012/6/24 Prof Brian Ripley <[hidden email]>:
>> On 24/06/2012 18:39, David Winsemius wrote:
>>>
>>>
>>> On Jun 24, 2012, at 1:21 PM, Li SUN wrote:
>>>
>>>> Sorry for the confusion.
>>>>
>>>> Let me state the question again. I missed something in my original
>>>> statement.
>>>>
>>>> When using the linear model lm() to fit data of the form y = k * x +
>>>> b, where k, b are the coefficients to be found, and x is the variable
>>>> and has an error bar (uncertainty) Δx of the same length associated
>>>> with it. Is it possible to pass Δx to the linear model lm(), and from
>>>> the output to find the uncertainty Δk for k, Δb for b as well?
>>>
>>>
>>> In one sense this could be done if you were interpreting the "Δx" as the
>>> vector of individual residuals of a model, but I'm guessing that might
>>> not be what you meant. You would be able to recover the original data,
>>> assuming you knew the X values, and would proceed by calculating the Y
>>> values as the sum of predictions and the residuals, thus recovering the
>>> original data. But  I'm guessing you want to supply a small number of
>>> parameters from an analysis you are reading about and you are hoping to
>>> be getting from lm() further information to answer some question. That's
>>> not the direction of teh flow of information. The flow is data INTO
>>> lm(), estimation of parameters OUT.
>>>
>>> Show us a sample dataset constructed with R code or show us the console
>>> output of dput() applied to your dataset, and you may get better answers
>>> to what is still an unclear question.
>>>
>>
>> This is not linear regression if 'x' is not known exactly.  There are
>> various formulations of the problem, but that is off-topic here. However,
>> consulting
>>
>> @Book{Fuller.87,
>>   author       = "Fuller, Wayne A.",
>>   title        = "Measurement Error Models",
>>   publisher    = "John Wiley and Sons",
>>   address =      "New York",
>>   year         = "1987",
>>   ISBN         = "0-471-86187-1",
>> }
>>
>> would be a good start.
>>
>> --
>> Brian D. Ripley,                  [hidden email]
>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>> University of Oxford,             Tel:  +44 1865 272861 (self)
>> 1 South Parks Road,                     +44 1865 272866 (PA)
>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>
>>
>> ______________________________________________
>> [hidden email] mailing list
>> 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.
>
> ______________________________________________
> [hidden email] mailing list
> 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.
>

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: p-value for the fitted parameters in linear models

Li Sun-2
2012/6/24 Uwe Ligges <[hidden email]>:

>
>
> On 24.06.2012 20:35, Li SUN wrote:
>>
>> Thanks David and Brian.
>>
>> But what if x is exact while y has some uncertainty Δy, in the
>> relation y = k * x + b?
>>
>> Now I need to fit some data like
>> x       = 1,          2,          3,          4,          5
>> y±Δy = 1.1±0.1, 2.0±0.2, 3.1±0.2, 4.1±0.1, 5.0±0.2
>>
>> Is there any mechanism to pass x, y and Δy to lm() so that I can find
>> k, b as well as their uncertainties Δk, Δb?
>
>
> Again, no: this is not a linear model. Assumption in a linear model is that
> the errors are identically distributed.

Thanks, Uwe. Can the nonlinear model nls() handle this situation?


>
> Uwe Ligges
>
>
>
>
>>
>>
>> Li Sun
>>
>>
>> 2012/6/24 Prof Brian Ripley <[hidden email]>:
>>>
>>> On 24/06/2012 18:39, David Winsemius wrote:
>>>>
>>>>
>>>>
>>>> On Jun 24, 2012, at 1:21 PM, Li SUN wrote:
>>>>
>>>>> Sorry for the confusion.
>>>>>
>>>>> Let me state the question again. I missed something in my original
>>>>> statement.
>>>>>
>>>>> When using the linear model lm() to fit data of the form y = k * x +
>>>>> b, where k, b are the coefficients to be found, and x is the variable
>>>>> and has an error bar (uncertainty) Δx of the same length associated
>>>>> with it. Is it possible to pass Δx to the linear model lm(), and from
>>>>> the output to find the uncertainty Δk for k, Δb for b as well?
>>>>
>>>>
>>>>
>>>> In one sense this could be done if you were interpreting the "Δx" as the
>>>> vector of individual residuals of a model, but I'm guessing that might
>>>> not be what you meant. You would be able to recover the original data,
>>>> assuming you knew the X values, and would proceed by calculating the Y
>>>> values as the sum of predictions and the residuals, thus recovering the
>>>> original data. But  I'm guessing you want to supply a small number of
>>>> parameters from an analysis you are reading about and you are hoping to
>>>> be getting from lm() further information to answer some question. That's
>>>> not the direction of teh flow of information. The flow is data INTO
>>>> lm(), estimation of parameters OUT.
>>>>
>>>> Show us a sample dataset constructed with R code or show us the console
>>>> output of dput() applied to your dataset, and you may get better answers
>>>> to what is still an unclear question.
>>>>
>>>
>>> This is not linear regression if 'x' is not known exactly.  There are
>>> various formulations of the problem, but that is off-topic here. However,
>>> consulting
>>>
>>> @Book{Fuller.87,
>>>  author       = "Fuller, Wayne A.",
>>>  title        = "Measurement Error Models",
>>>  publisher    = "John Wiley and Sons",
>>>  address =      "New York",
>>>  year         = "1987",
>>>  ISBN         = "0-471-86187-1",
>>> }
>>>
>>> would be a good start.
>>>
>>> --
>>> Brian D. Ripley,                  [hidden email]
>>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>>> University of Oxford,             Tel:  +44 1865 272861 (self)
>>> 1 South Parks Road,                     +44 1865 272866 (PA)
>>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>>
>>>
>>> ______________________________________________
>>> [hidden email] mailing list
>>> 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.
>>
>>
>> ______________________________________________
>> [hidden email] mailing list
>> 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.
>>
>

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: p-value for the fitted parameters in linear models

Bert Gunter
Dear Li Sun:

You appear to have a good deal of statistical confusion. R-help is not a
statistical consulting service. You should consult a local statistician or,
if that's not possible,post on a statistical help list like
stats.stackexchange.com

-- Bert

On Sun, Jun 24, 2012 at 12:04 PM, Li SUN <[hidden email]> wrote:

> 2012/6/24 Uwe Ligges <[hidden email]>:
> >
> >
> > On 24.06.2012 20:35, Li SUN wrote:
> >>
> >> Thanks David and Brian.
> >>
> >> But what if x is exact while y has some uncertainty Äy, in the
> >> relation y = k * x + b?
> >>
> >> Now I need to fit some data like
> >> x       = 1,          2,          3,          4,          5
> >> y±Äy = 1.1±0.1, 2.0±0.2, 3.1±0.2, 4.1±0.1, 5.0±0.2
> >>
> >> Is there any mechanism to pass x, y and Äy to lm() so that I can find
> >> k, b as well as their uncertainties Äk, Äb?
> >
> >
> > Again, no: this is not a linear model. Assumption in a linear model is
> that
> > the errors are identically distributed.
>
> Thanks, Uwe. Can the nonlinear model nls() handle this situation?
>
>
> >
> > Uwe Ligges
> >
> >
> >
> >
> >>
> >>
> >> Li Sun
> >>
> >>
> >> 2012/6/24 Prof Brian Ripley <[hidden email]>:
> >>>
> >>> On 24/06/2012 18:39, David Winsemius wrote:
> >>>>
> >>>>
> >>>>
> >>>> On Jun 24, 2012, at 1:21 PM, Li SUN wrote:
> >>>>
> >>>>> Sorry for the confusion.
> >>>>>
> >>>>> Let me state the question again. I missed something in my original
> >>>>> statement.
> >>>>>
> >>>>> When using the linear model lm() to fit data of the form y = k * x +
> >>>>> b, where k, b are the coefficients to be found, and x is the variable
> >>>>> and has an error bar (uncertainty) Äx of the same length associated
> >>>>> with it. Is it possible to pass Äx to the linear model lm(), and from
> >>>>> the output to find the uncertainty Äk for k, Äb for b as well?
> >>>>
> >>>>
> >>>>
> >>>> In one sense this could be done if you were interpreting the "Äx" as
> the
> >>>> vector of individual residuals of a model, but I'm guessing that might
> >>>> not be what you meant. You would be able to recover the original data,
> >>>> assuming you knew the X values, and would proceed by calculating the Y
> >>>> values as the sum of predictions and the residuals, thus recovering
> the
> >>>> original data. But  I'm guessing you want to supply a small number of
> >>>> parameters from an analysis you are reading about and you are hoping
> to
> >>>> be getting from lm() further information to answer some question.
> That's
> >>>> not the direction of teh flow of information. The flow is data INTO
> >>>> lm(), estimation of parameters OUT.
> >>>>
> >>>> Show us a sample dataset constructed with R code or show us the
> console
> >>>> output of dput() applied to your dataset, and you may get better
> answers
> >>>> to what is still an unclear question.
> >>>>
> >>>
> >>> This is not linear regression if 'x' is not known exactly.  There are
> >>> various formulations of the problem, but that is off-topic here.
> However,
> >>> consulting
> >>>
> >>> @Book{Fuller.87,
> >>>  author       = "Fuller, Wayne A.",
> >>>  title        = "Measurement Error Models",
> >>>  publisher    = "John Wiley and Sons",
> >>>  address =      "New York",
> >>>  year         = "1987",
> >>>  ISBN         = "0-471-86187-1",
> >>> }
> >>>
> >>> would be a good start.
> >>>
> >>> --
> >>> Brian D. Ripley,                  [hidden email]
> >>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> >>> University of Oxford,             Tel:  +44 1865 272861 (self)
> >>> 1 South Parks Road,                     +44 1865 272866 (PA)
> >>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> >>>
> >>>
> >>> ______________________________________________
> >>> [hidden email] mailing list
> >>> 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.
> >>
> >>
> >> ______________________________________________
> >> [hidden email] mailing list
> >> 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.
> >>
> >
>
> ______________________________________________
> [hidden email] mailing list
> 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.
>


--

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: p-value for the fitted parameters in linear models

S Ellison-2
In reply to this post by Uwe Ligges-3


>> But what if x is exact while y has some uncertainty Δy, in the
>> relation y = k * x + b?
>
>Again, no: this is not a linear model. Assumption in a linear model is
>that the errors are identically distributed.

Surely not; errors in a linear model do not need to be homoscedastic. lm handles heteroscadasticity in y via weights, and the formulation above looks  to be simply a linear model with heteroscedastic error in y.

What lm will _not_ do is fit the fixed effects model taking acount _solely_ of the 'uncertainties' in x. It will use the weighted sum of squared residuals, and although that is the usual thing to do it may not be what the OP wants.

But since the OP first asked about fitting with error in x one might suspect there is more to it; if this is just the original question turned round, the answer would be that turning the regression round is only sensible when y was the predictor in the first place - in which case the original question was the wrong way round. And if the OP is now simply ignoring error in x that is actually present, that too would speak against simple linear regression.

Those are pretty fundamental issues, so finding a local statistician is indeed the only safe course.

S Ellison
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: p-value for the fitted parameters in linear models

Li Sun-2
Dear All,

Thanks for all your explanations and sorry for the confusion. I will
need to consult some statistician for help.

Sincerely,
Li Sun



2012/6/24 S Ellison <[hidden email]>:

>
>
>>> But what if x is exact while y has some uncertainty Δy, in the
>>> relation y = k * x + b?
>>
>>Again, no: this is not a linear model. Assumption in a linear model is
>>that the errors are identically distributed.
>
> Surely not; errors in a linear model do not need to be homoscedastic. lm handles heteroscadasticity in y via weights, and the formulation above looks  to be simply a linear model with heteroscedastic error in y.
>
> What lm will _not_ do is fit the fixed effects model taking acount _solely_ of the 'uncertainties' in x. It will use the weighted sum of squared residuals, and although that is the usual thing to do it may not be what the OP wants.
>
> But since the OP first asked about fitting with error in x one might suspect there is more to it; if this is just the original question turned round, the answer would be that turning the regression round is only sensible when y was the predictor in the first place - in which case the original question was the wrong way round. And if the OP is now simply ignoring error in x that is actually present, that too would speak against simple linear regression.
>
> Those are pretty fundamental issues, so finding a local statistician is indeed the only safe course.
>
> S Ellison
> *******************************************************************
> This email and any attachments are confidential. Any u...{{dropped:8}}

______________________________________________
[hidden email] mailing list
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.
Loading...