Displaying 1 result from an estimated 1 matches for "realpar".
Did you mean:
readpar
2009 Apr 07
1
get optim results into a model object
...el that
1) sums the betas to 1,
2) constrains the betas to positive numbers less than 1
3) does not constrain alpha
(The constrOptim cousin wasn't very accurate, and was very slow.)
Here is an example of some code, the results of which I would like to get
into a model with the form
y ~ alpha + REALPAR * x
where 'REALPAR' is the "normalized" output at the very end
many thanks!!!!
++++++++++++++++Code Below++++++++++++++++++++++++++++
set.seed(121)
x1=.04
for (i in 1:14) x1[i+1]=x1[i]*(1+rnorm(1)*.008)+.00025
x2=.08
for (i in 1:14) x2[i+1]=x2[i]*(1+rnorm(1)*.03)-.0018
x3=.01
fo...