Displaying 20 results from an estimated 8000 matches similar to: "Help with lsei() from package limSolve()"
2011 Aug 27
1
Error: package 'lsei' is not installed for 'arch=i386'
Hi guys,
I am having problem loading a package that I have installed. I have searched
some old thread but they were no help in terms of solving the problem.
I uninstalled every possible component of R and installed R 2.13 and
followed the R-faqs installation steps. Then I installed the package (lsei)
from local zip file which was installed successfully but can not be loaded
and returns the error
2012 Oct 19
2
Which package/function for solving weighted linear least squares with inequality and equality constraints?
Dear All,
Which package/function could i use to solve following linear least square
problem?
A over determined system of linear equations is given. The nnls-function may
would be a possibility  BUT:
The solving is constrained with 
a inequality that all unknowns are >= 0 
and a equality that the sum of all unknowns is 1
The influence of the equations according to the solving process is
2012 Jul 03
0
need help EM algorithm to find MLE of coeff in mixed effects model
Dear All,
  have a general question about coefficients estimation of the mixed model.
I simulated a very basic model: Y|b=X*\beta+Z*b +\sigma^2* diag(ni);
                                                             b follows
N(0,\psi)  #i.e. bivariate normal
where b is the latent variable, Z and X are ni*2 design matrices, sigma is
the error variance,
Y are longitudinal data, i.e. there are ni
2012 Jul 03
2
EM algorithm to find MLE of coeff in mixed effects model
I have a general question about coefficients estimation of the mixed model.
I simulated a very basic model: Y|b=X*\beta+Z*b +\sigma^2* diag(ni);
                                                             b follows
N(0,\psi)  #i.e. bivariate normal
where b is the latent variable, Z and X are ni*2 design matrices, sigma is 
the error variance,
Y are longitudinal data, i.e. there are ni
2009 Dec 04
2
Solve linear program without objective function
Dear R-users,
i try to solve to following linear programm in R
0 * x_1 + 2/3 * x_2 + 1/3 * x_3 + 1/3 * x_4 = 0.3
x_1 + x_2 + x_3 + x_4 = 1
x_1, x_2, x_3, x_4 > 0,
x_1, x_2, x_3, x_4 < 1
as you can see i have no objective function here besides that i use the 
following code.
library(lpSolve)
f.obj<-c(1,1,1,1)
f.con<-matrix(c(0,2/3,1/3,1/3,
                1,1,1,1,
               
2014 Dec 17
2
optimización - resolver sistema - general
Hola a todos,
     Simplemente comentar que me tengo encontrado con muchos problemas 
de optimización. Mi recomendación general, en el caso multidimensional y 
si el tiempo de computación es importante, sería buscar un algoritmo 
diseñado para el tipo de problema (evitar los algoritmos más generales 
tipo optim si puede haber problemas de mínimos locales).  Algunos casos 
que tengo resuelto con R
2008 Oct 13
0
optim and nlm error to estimate a matrix
Dear R users,
I'm trying to estimate the matrix of regression parameters.
I need to do it numerically, so I used optim and nls.
I got the initial parameter estimates from least squares, and input them into those functions.
But when I run the optim function, it stops in 30 seconds and shows 'convergence=1'. 
And if I use the nlm function, then it runs for a while, and finally stops
2009 Dec 15
1
Help in R
Hello,
   Can anyone give me some suggestion in term of calculating the sum below.
Is there a function in R that can help doing it faster?
x1, x2, ...xn where xi can be 0 or 1. I want to calculate the following:
sum{ beta[a+sum(xi), b+n-sum(xi) ]* [ (1-x1)dnorm(0,1)+x1dnorm(2,1) ]*  [
(1-x2)dnorm(0,1)+x2dnorm(2,1) ]* ...* [ (1-xn)dnorm(0,1)+xndnorm(2,1) ] }
The sum in the beginning is over all
2011 Dec 19
2
Constrained Optimisation
Dear All
I have a constrained optimisation problem, I want to maximise the following
function
t(weights) %*% CovarianceMatrix %*% weights
for the weights, 
subject to  constraints on each element within the weights & the weights
vector  summing to 1.
i.e.
weights = (x1, x2, x3), where x1 is within some given range (a +b, a - b).
I have tried to do this using the optim function in R,
2002 Feb 20
2
How to get the penalized log likelihood from smooth.spline()?
I use smooth.spline(x, y) in package modreg and I would like to get
value of penalized log likelihood and preferable also its two parts. To
make clear what I am asking for (and make sure that I am asking for the
right thing) I clarify my problem trying to use the same notation as in
help(smooth.spline):
I want to find the natural cubic spline f(x) such that
   L(f) = \sum_{k=1}{n} w[k](y[k] -
2008 May 01
1
Optimal knot locations for splines
Suppose I have two variables, x and y.  For a fixed number of knots, I want
to create a spline transformation of x such that a loss function is
minimized.  Presumably, this loss function would be least squares, i.e. sum
(f(x)-y)^2.  The spline transformations would be linear, quadratic or
cubic.  I know I can solve this problem using some optimization function in
R, but I was wondering if anyone
2008 May 12
1
Quadratic Constraints
Hi R,
 
A quick question.... How can I optimize the objective function
constrained to quadratic constraints? Which function of R is useful for
quadratic constraints?
 
Many Thanks,
Shubha
 
This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2006 Oct 27
0
VGAM package released on CRAN
Dear useRs,
upon request, the VGAM package (currently version 0.7-1) has been
officially released on CRAN (the package has been at my website
http://www.stat.auckland.ac.nz/~yee/VGAM for a number of years now).
VGAM implements a general framework for several classes of
regression models using iteratively reweighted least squares
(IRLS). The key ideas are Fisher scoring, generalized linear
and
2010 Apr 09
0
rjags syntax error
Hi, I am getting the following error when I'm running jags.model()
> meas1 <- jags.model(file="measurement.bug",data=dat.test)
syntax error, unexpected '}', expecting ',' or ')'
Error in jags.model(file = "measurement.bug", data = dat.test) : 
  
Parse error on line 1
Below is my JAGS model. Please cc me as I'm a digest subscriber if
2016 Dec 18
2
llvm (the middle-end) is getting slower, December edition
>
>
>>
> LVI is one of those analyses with quadratic runtime, but has a cutoff to
> its search depth so that it is technically not quadratic. So increased
> inlining could easily exacerbate it more than non-"quadratic" passes.
> (increased inlining would also cause a general slowdown too).
>
>
LVI is only quadratic because of the way we've built it
2009 Mar 03
1
SPSS data import: problems & work arounds for GSS surveys
I'm using R 2.8.1 on Ubuntu 8.10.  I'm writing partly to ask what's
wrong, partly to tell other users who search that there is a work
around.
The General Social Survey is a long standing series of surveys
provided by NORC (National Opinion Research Center).  I have
downloaded some years of the survey data in SPSS format (here's the
site:
2010 Jun 18
0
Confidence interval calculation for intersection of two quadratic lines
How do I calculate the confidence interval for the value x given by the intersection of two quadratics (i.e. parabolas)?
I fit two quadratics of the form:
  y = C1 + B1*x + A1*x^2
  y = C2 + B2*x + A2*x^2
to two sets of points N1 and N2.
I test for whether they intersect, if they do then I calculate the roots of:
  0 = (C1 - C2) + (B1 - B2)*x + (A1 - A2)*x^2
to determine where they intersect
2006 Dec 02
0
fixup for debug package and R2.4.0
A number of users have spotted a terminal problem with the 'debug' package under R2.4.0, along the lines of 
> mtrace(x)
> x()
Error in attr(value, "row.names") <- rlabs :
 row names must be 'character' or 'integer', not 'double' 
This arose from a bug in 'rbind.data.frame' in R2.4.0 itself. The bug is fixed in R2.4.0 patched, so the
2011 Jan 21
0
Marginality rule between powers and interaction terms in lm()
Dear all,
I have a model with simple terms, quadratic effects, and interactions.
I am wondering what to do when a variable is involved in a significant
interaction and in a non-significant quadratic effect. Here is an
example
	d = data.frame(a=runif(20), b=runif(20))
	d$y = d$a + d$b^2
So I create both an simple effect of a and a quadratic effect of b.
	m = lm(y ~ a + b + I(a^2) + I(b^2) +
2010 Oct 03
1
Johnson Distribution Fit
Hi,
      I am trying to fit a Johnson SB distribution using fitdist function in
fitdistrplus Library. I have defined the Johnson SB distribution from (
http://www.ntrand.com/johnson-sb-distribution/) . But it gives me the
follwing errors. Any help would be appreciated
#xi = xi
#lambda =l
#delta =d
#gamma = g
djohn = function(x,xi,l,d,g)
(d/(l*sqrt(2*pi)*((x-xi)/l)*(1-((x-xi)/l))))*exp[-0.5*(g +