Fitting a linear model with constraints is a completely different task
from fitting one without -- and it is the fit you want to constrain,
not the formula.
See CRAN package nnls to fit a linear model with sign constraints. If
you have range constraints you can use nls(algorithm="port") since
Dear R users & experts,
I'd like to create a model using lm (or glm) under some constraints of
how coefficients for each component could look like (sort of a range of
coefficients that should be allowed).
So let's go for an example :
model=lm(age ~ eyecolor + height, data=inputdata)
So let's sup
2 matches
Mail list logo