BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ming
Calcite | Level 5

Hi,

I'm trying to determine the speed that a runner reaches at the end of a 3min all out effort.  I have collected time and speed (at that given time) and when plotted on a scatter plot, it looks like it goes to an asymptote.  Is there a procedure in SAS that can determine that asymptote speed?  I wanted to use PROC NLIN but I don't know the function so I looked into PROC TRANSREG and the spline sometimes gives me the asymptote but sometimes it curves up at the end... Theoretically, it should be a smooth exponential decay or inverse curse from time zero to time (>3min).

here are my data...

time(s)speed (m/s)
7.86.41
11.466.83
15.116.85
31.46.37
34.97.14
396.10
43.785.23
48.145.73
52.775.40
57.84.97
62.35.56
67.15.21
72.24.90
76.65.68
81.45.21
87.753.94
92.894.86
98.054.84
103.84.35
109.14.72
114.34.81
119.94.46
124.85.10
130.24.63
136.63.91
1424.63
147.714.38
153.24.55
158.74.55
164.34.46
169.94.46
175.14.81
180.44.72

any help will be great!

thanks!

ming

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Try

proc nlin data=test;
parms Vo=2.5 a=-0.017 Vf=4.5;
model speed = Vo*exp(a*seconds) + Vf;
output out=outTest predicted=predSpeed;
run;

proc sgplot data=outTest noautolegend;
series x=seconds y=predSpeed;
scatter x=seconds y=speed;
yaxis min=0;
run;

Initial speed is Vo + Vf. Asymptotic speed is Vf.

                                          Approx       Approximate 95% Confidence
            Parameter      Estimate    Std Error                 Limits

            Vo               3.1430       0.3154      2.4989      3.7870
            a               -0.0176      0.00493     -0.0277    -0.00751
            Vf               4.2795       0.2463      3.7765      4.7826

SGPlot2.png

Seems to fit well...

PG

PG

View solution in original post

3 REPLIES 3
PGStats
Opal | Level 21

Try

proc nlin data=test;
parms Vo=2.5 a=-0.017 Vf=4.5;
model speed = Vo*exp(a*seconds) + Vf;
output out=outTest predicted=predSpeed;
run;

proc sgplot data=outTest noautolegend;
series x=seconds y=predSpeed;
scatter x=seconds y=speed;
yaxis min=0;
run;

Initial speed is Vo + Vf. Asymptotic speed is Vf.

                                          Approx       Approximate 95% Confidence
            Parameter      Estimate    Std Error                 Limits

            Vo               3.1430       0.3154      2.4989      3.7870
            a               -0.0176      0.00493     -0.0277    -0.00751
            Vf               4.2795       0.2463      3.7765      4.7826

SGPlot2.png

Seems to fit well...

PG

PG
Ming
Calcite | Level 5

thanks for your help!

I tried it on another set of data with 4 data points, it didn't fit as well, but if I play around with the starting points for Vo, a, and Vf... sometimes I can get it to converge.

ming

PGStats
Opal | Level 21

Fitting a 3-parameter curve on 4 points doesn't give much freedom!

Given times T1-T4 and speeds S1-S4, you can try :

Vo=S1-S4, Vf=S4, a=-1.4/(T2+T3)

  

as starting values.

   

Good luck!

 

PG

PG

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2038 views
  • 0 likes
  • 2 in conversation