Skip to content

nonworking 'nls' method frmo base 'stats' package #54

@donarus

Description

@donarus

The 'stats' package is one of the base packages preinstalled with R/FastR

there is a method NLS (non-linear least squares method)

In GNU R the following example work perfectly fine

regressionData <- data.frame(
  x = c(1, 2, 3, 4),
  y = c(1.5, 3.3, 99, 16)
)
startingParams <- list(
  a = 1,
  q = 2
)
mNLS <- nls(formula = "y ~ a*x^q",
            data = regressionData,
            start = startingParams)

but in FastR it produces an error, although the input is valid.

Error in nlsModel(formula, mf, start, wts) :
  singular gradient matrix at initial parameter estimates

PS: If you want, I have multiple other examples of nonworking chunks from base packages, but I'm unsure where to track them

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions