Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6050767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:43:31+00:00 2026-05-23T07:43:31+00:00

I have an exponential model calculated with mod <- nls(y ~ exp(- (x/a)^b), data

  • 0

I have an exponential model calculated with

mod <- nls(y ~ exp(- (x/a)^b), data = DF, start = list(a = 200, b = 1.4))

which I plotted using:

plot(x,y)
lines(sort(DF$x),predict(mod, list(x=sort(DF$x))), lwd=2, col="red")

writting mod I get:

Nonlinear regression model 
  model:  y ~ exp(-(x/a)^b) 
   data:  DF 
       a        b 
    211.7098   0.3908 
 residual sum-of-squares: 17.69

Number of iterations to convergence: 5 
Achieved convergence tolerance: 1.477e-07 

With summary(mod) I get:

Formula: y ~ exp(-(x/a)^b)
Parameters:
   Estimate Std. Error t value Pr(>|t|)       
a 2.117e+02  2.799e+00   75.64   <2e-16 ***
b 3.908e-01  9.154e-03   42.69   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
Residual standard error: 0.08832 on 2268 degrees of freedom
Number of iterations to convergence: 5 
Achieved convergence tolerance: 1.477e-07 
  (8 observations deleted due to missingness)

My question is if there is a way of adding the formula, the parameters and the residual sum-of-squares to the plot? The only way I could come up with was using the text() and copy and paste the info I wanted but I will have to do lots of different models so I would like something automatic. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:43:32+00:00Added an answer on May 23, 2026 at 7:43 am

    Try this where the first line will produce a plot we can use in this example and
    the next line adds the desired text:

    example(nls)
    legend("topleft", legend = capture.output(summary(nlmod)), cex = .5)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have just started using Visual Studio Professional's built-in unit testing features, which as I
i have question how write program which calculates following procedures http://en.wikipedia.org/wiki/Tetration i have exponential
I have a set of data and I want to compare which line describes
If I have to write a model for exponential decline in deaths and therefore
I have following (exponential) values and want to calculate their median using R: 1.0584e+00
Have just started using Google Chrome , and noticed in parts of our site,
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a
I have the following function: -- | Exponential moving average. ema :: (Fractional a)
I have data in data table like below. I am trying to make graph
we have some calculation in our project like convertion from non-Exponential(1234567890.1234567890 numbers to Exponential(1.234567890E+10)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.