Displaying 20 results from an estimated 6000 matches similar to: "Symbolic Maximum Likelihood in R"
2012 Aug 16
1
Symbolic computation in R-solving system of equations
Hi,
   To my knowledge, Ryacas can do symbolic computation in R, like
Mathematica or Maple.
   I wonder if it (or any other R package) can solve symbolically a system
of equations? I have a system of four equations in four variables
(non-linear, but not very hard to solve) and wonder if Ryacas or any other
package can do it. I do not find the solution in Ryacas. Can it find a
symbolic solution
2006 Jan 25
4
D(dnorm...)?
Can someone help me understand the following:
 > D(expression(dnorm(x, mean)), "mean")
[1] 0
 > sessionInfo()
R version 2.2.1, 2005-12-20, i386-pc-mingw32
attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
[7] "base"
	  By my computations, this should be
2009 Dec 10
1
MLE for a t distribution
Given X1,...,Xn ~ t_k(mu,sigma) student t distribution with k degrees
of freedom, mean mu and standard deviation sigma, I want to obtain the
MLEs of the three parameters (mu, sigma and k). When I try traditional
optimization techniques I don't find the MLEs. Usually I just get
k->infty. Does anybody know of any algorithms/functions in R that can
help me obtain the MLEs? I am especially
2007 Jul 21
1
Gamma MLE
Hello,
I was asked to try the following code on R,
gamma.mles
function (xx,shape0,rate0)
{
n<- length(xx)
xbar<- mean(xx)
logxbar<- mean(log(xx))
theta<-c(shape0,rate0)
repeat {
theta0<- theta
shape<- theta0[1]
rate<- theta0[2]
S<- n*matrix(c(log(rate)-digamma(shape)+logxbar,shape/rate-xbar),ncol=1)
I<- n*matrix(c(trigamma(shape),-1/rate,-1/rate,shape/rate^2),ncol=2)
2008 Jan 31
1
Ryacas
I'm tinkering around in Ryacas trying to find an easy way to get the
first and second partial derivatives of mu and sigma from a normal
distribution (actually a bitterly ugly likelihood but this example works
for now). 
I've done all of the work in Mathematica, but I then need to manually
write R code whereas I think Ryacas will give me the expression such
that I can export for Tex and
2006 Aug 24
1
Optim question
This is a very basic question, but I am a bit confused with optim. I
want to get the MLEs using optim which could replace the newton-raphson
code I have below which also gives the MLEs. The function takes as input
a vector x denoting whether a respondent answered an item correctly
(x=1) or not (x=0). It also takes as input a vector b_vector, and these
are parameters of test items (Rasch estimates
2010 Jun 17
2
Pretty printing progress
I have a function that is an iterative process for estimating some MLEs. I want to print some progress to screen as the process iterates. I would like to try and line things up nicely in the R window, but am not sure the best way to do this. Below is a toy example. Suppose I want the value of 10 to be just below "iteration" and the value of -1234 to be just below 'Log
2012 Aug 02
1
finding the MLEs of IG parameters by EM-Alorithm
Dear all
I'm trying to caculate the MLEs for parameters of Inverse Gaussian
distribution (in a k-sample problem with common mean) by using
EM-Algorithm.  I found some package for EM-Algorithm that are useful
for missing or incomplete data and are not helpful for solving my
problem.
(Exactly, the problem is: Let Xij, i=1,..,k , j=1,...,ni, be a random
sample from IG(?,?i). So the
2008 Apr 21
1
Symbolic Integration in R
This may be a question to R-development but I'm not sure. Symbolic
differentiation is implemented in R (maybe not for extremely complex
expressions), but it proves that it can be done. I know that in C++ it can
be done (symbolic c++), do you think in R it can be programmed just using
the R language without resorting to external sources? Does anyone know or
can estimate the amount of resources
2009 Nov 04
1
compute maximum likelihood estimator for a multinomial function
Hi there
I am trying to learn how to compute mle in R for a multinomial negative 
log likelihood function.
I am using for this the book by B. Bolker "Ecological models and data in 
R", chapter 6: "Likelihood an all that". But he has no example for 
multinomial functions.
What I did is the following:
I first defined a function for the negative log likelihood:
2012 Feb 06
1
MLEs using optim
I am trying to use the optim command to get the MLEs for a number of
parameters based on some data. Is it possible to write a program that
maximizes the likelihood and stores the parameters (many times)? I need to
do this a lot of times, each time the data will be updated with more entries
(rows). I need to see how the new data is affecting the previous parameter
estimates of the model. What is
2008 Mar 06
1
Interesting remarks about R back in 1999
Hi, this is not an R-help post, but I found this extract below that was
written by a leading mathematician back in 1999 when he was talking about
statistics and computing. I found it interesting to share and I ask your
opinion do you think this still holds today or things have changed? Thanks.
?...we would also like to mention that in our opinion Mathematica provides
an excellent and indeed
2008 Jan 24
1
Ryacas behaving weird
There is either something wrong with either me or is Yacas/Ryacas doing odd
things. See below I ask to simpify an expression and the there's output! If
this is a simplification.. well.. Do you think there is something set wrong
somewhere. Thanks.
> library(Ryacas)
Loading required package: XML
> a=Sym("a")
> N=Sym("N")
> b=Sym("b")
>
2012 Oct 29
2
Two-way Random Effects with unbalanced data
Hi there,
I am looking to fit a two-way random effects model to an *unblalanced*
layout,
                              y_ijk = mu + a_i + b_j + eps_ijk,    
i=1,...,R, j=1,...,C, k=1,...,K_ij.
I am interested first of all in estimates for the variance components,
sigsq_a,  sigsq_b and sigsq_error.
In the balanced case, there are simple (MM, MLE) estimates for these; In the
unbalanced setup,
2005 Dec 14
1
Translation Dictionary (Rosetta Stone)
Dear List:
A while back I found a web site called the Rosetta Stone for Computer
Algebra Systems showing how to do similar operations in different
symbolic programs. This has been very helpful for moving between
Mathematica, Yacas and Maxima.
I wonder if anyone maintains something akin to this for translating R to
SAS, Minitab, Stata etc?
I am familiar with the various (useful) reference
2017 Sep 19
1
symbolic computing example with Ryacas
Thanks for the response. Yes, I did study the vignette but did not
understand it fully. Anyway, I have tried once again now. I am happy to say
that I have got what I wanted.
library(Ryacas)
x <- Sym("x");U <- Sym("U");x0 <- Sym("x0");C <- Sym("C")
my_func <- function(x,U,x0,C) {
  return (U/(1+exp(-(x-x0)/C)))}
FirstDeriv <-
2011 Apr 04
1
Clarks 2Dt function in R
Dear Ben,
you answerd to Nancy Shackelford about Clarks 2Dt function.
Since the thread ended just after your reply,
I would like to ask, if you have an idea how to use this function in R
I defined it the following way:
function(x , p, u) {
  (p/(pi*u))*(1+(x^2/u))^(p+1)
}
and would like to fit this one to my obeservational data (count)
       [,1] [,2]
 [1,]   15   12
 [2,]   45   13
 [3,]  
2012 Sep 12
3
Need help
Hello,
I am brand new in this site as well as in R. Please accept my early apology if it's not the right place to ask such a question.
I have the following equation:
b=[2(1-a)(1+2a)^0.5]/(1+3a)
How can I solve the above equation for 'a' using R?
Thanks in advance.
KD
	[[alternative HTML version deleted]]
2017 Sep 19
2
symbolic computing example with Ryacas
Hi all,
I am trying to implement the following matlab code with Ryacas :
syms U x x0 C
d1=diff(U/(1+exp(-(x-x0)/C)),x);
pretty(d1)
d2=diff(U/(1+exp(-(x-x0)/C)),x,2);
pretty(d2)
solx2 = solve(d2 == 0, x, 'Real', true)
pretty(solx2)
slope2=subs(d1,solx2)
I have tried the following :
library(Ryacas)
x <- Sym("x");U <- Sym("U");x0 <-
2008 Sep 19
2
Error: function cannot be evaluated at initial parameters
I have an error for a simple optimization problem. Is there anyone knowing
about this error?
lambda1=-9
lambda2=-6
L<-function(a){
s2i2f<-(exp(-lambda1*(250^a)-lambda2*(275^a-250^a))
       -exp(-lambda1*(250^a)-lambda2*(300^a-250^a)))
logl<-log(s2i2f)
return(-logl)}
optim(1,L)
Error in optim(1, L) : function cannot be evaluated at initial parameters
Thank you in advance
-- 
View this