Hi!
I am a bit new to R.
I am looking for the right function to use for a multiple regression problem
of the form:
y = c1 + x1 + (c2 * x2) - (c3 * x3)
Where c1, c2, and c3 are the desired regression coefficients that are
subject to the following constraints:
0.0 c2 1.0, and
0.0 c3 1.0
y,
Hello!
I am getting the following errors when running optim() [I tried optim() with
3 different methods as you can see]:
Error in optim(c(0.66, 0.999, 0.064), pe, NULL, method = L-BFGS-B) :
objective function in optim evaluates to length 6 not 1
out - optim( c(0.66, 0.999, 0.064),
,
0.0596026490066225, 0.61578947368421)
Thank you again,
Stu
-Original Message-
From: Liviu Andronic [mailto:landronim...@gmail.com]
Sent: Tuesday, June 16, 2009 2:35 AM
To: Stu @ AGS
Cc: r-help@r-project.org
Subject: Re: [R] Trouble with optim on a specific problem
Hello,
On 6/16
Hello!
I am trying to write a function with vector and data.frame parameters that
uses the sum() function and values from the rows of the data.frame.
I need to pass this function as a parameter to optim().
My starting point is:
observs - data.frame(y, x1, x2, x3)
Fn - function(par,
Hello,
On 6/16/09, Stu @ AGS s...@agstechnet.com wrote:
Thanks for your response!
No, my basic equation does not use matrices at all. It takes scalar
values and returns a scalar.
Not quite. Taking the example above, if you run the following:
with(observs , {1*x1*x2^2*x3^3})
[1] 0.000e
]
Sent: Tuesday, June 16, 2009 11:31 AM
To: Stu @ AGS
Subject: Re: [R] The most straightfoward way to write a function that
sums over the rows of a matrix
'The R Inferno' may be of use to you.
Patrick Burns
patr...@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home
Hi Livia and everyone,
Did you ever get a response on this question from last year (Jan 2008)?
I am also looking for more explanatory documentation on the
ui and ci parameters for the function constrOptim().
The examples provided in the R help and the full
After a few days of work, I think I nearly have it.
Unfortunately, theta is unchanged after I run this (as a script from a
file). I thought that theta would contain the fitted parameters.
The goal here is to find the least squares fit according to the function
defined as rss subject to the
Hi,
I am a bit stuck on specifying ui and ci.
I have read Lange's book ((1999) Numerical Analysis for Statisticians) to
his approach and unfortunately his descriptions were not helpful for me.
Here is what I have:
ui - rbind(c(0, -1, 0), c(0, 0, -1))
ci - c(0, -1, -1))
Dear R Helper Community!
Thank you for all your help and suggestions.
For your reference and any future person searching the archives, here is the
solution that did what I wanted it to do.
As background, my goal was to find the coefficients for the following
equation form:
y ~ c1 * x1
10 matches
Mail list logo