finding slope/inte​rcept/std.​deviation of replicates

조회 수: 2 (최근 30일)
Andy
Andy 2012년 1월 27일
how do i find the slope and intercept of replicates? so for each x-value i have, there would be more than 1 y-value (e.g. 6 y value for each x value)
how would i go about finding the slope and intercept of this? i am not allowed to just average out the y-values for each x-value. they call these replicates. Thanks!
  댓글 수: 1
Sean de Wolski
Sean de Wolski 2012년 1월 27일
So robust estimation? Why can't you just average them?

댓글을 달려면 로그인하십시오.

답변 (1개)

Tom Lane
Tom Lane 2012년 1월 28일
You can just include the x value once for each y value. If you're just talking about least squares coefficient estimation (no standard errors or the like), this will give the same answer as averaging out the y values.
>> x = [1 1 1 5 5 5 5]';
>> y = [1 2 3 10 15 20 25]';
>> p = polyfit(x,y,1)
p =
3.8750 -1.8750
>> polyfit([1 5]',[2 17.5]',1)
ans =
3.8750 -1.8750

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by