Displaying 20 results from an estimated 5000 matches similar to: "MLE where loglikelihood function is a function of numerical solutions"
2011 Sep 14
1
Selecting from matrix and then stacking in array.
Hi,
I'm solve a problem where I want to select every 3rd row from a matrix. I do
this for all rows in a loop. This gives me "i" matrices with different
number of rows
I want to stack these matrices in an array and fill the blanks with zero.
Does anyone have any suggestions on how to go about this?
So i want to go from
[,1] [,2] [,3]
[1,] 1 1 1
[2,] 2 2
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
2011 Sep 22
1
Error in as.vector(data) optim() / fkf()
Dear R users,
When running the program below I receive the following error message:
fit <- optim(parm, objective, yt = tyield, hessian = TRUE)
Error in as.vector(data) :
no method for coercing this S4 class to a vector
I can't figure out what the problem is exactly. I imagine that it has
something to do with "tyield" being a matrix. Any help on explaining what's
going on
2011 Nov 12
1
State space model
Hi,
I'm trying to estimate the parameters of a state space model of the
following form
measurement eq:
z_t = a + b*y_t + eps_t
transition eq
y_t+h = (I -exp(-hL))theta + exp(-hL)y_t+ eta_{t+h}.
The problem is that the distribution of the innovations of the transition
equation depend on the previous value of the state variable.
To be exact: y_t|y_{t-1} ~N(mu, Q_t) where Q is a diagonal
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
2011 Sep 02
1
Using capture.output within a function
Dear R-users
I'm running a maximum likelihood procedure using the spg package. I'd like
to save some output produced in each iteration to a file, but if I put the
capture.output() within the function I get the following message; Error in
spg(par = startval, fn = loglik, gr = NULL, method = 3, lower = lo, :
Failure in initial function evaluation!Error in -fn(par, ...) : invalid
argument
2011 Oct 13
2
write.csv naming file after function argument
Dear R-users,
I'm writing a program that constructs a dataset. I wish to save the dataset
to a file.
Here's a very simple example of what I'm trying to do
function(x=peter){
y <- x/2
write.csv(y, file = "...\x")
}
The problem is that I want to name the dataset as whatever the name of the
input is. In this case peter.
How do I do this?
Thank you in advance.
Kristian
2007 Apr 09
1
R:Maximum likelihood estimation using BHHH and BFGS
Dear R users,
I am new to R. I would like to find *maximum likelihood estimators for psi
and alpha* based on the following *log likelihood function*, c is
consumption data comprising 148 entries:
fn<-function(c,psi,alpha)
{
s1<-sum(for(i in 1:n){(c[i]-(psi^(-1/alpha)*(lag(c[i],-1))))^2*
(lag(c[i],-1)^((-2)*(alpha+1))
)});
s2<- sum(for(m in 1:n){log(lag(c[m],-1)^(((2)*alpha)+2))});
2016 Aug 19
3
multiple domain and winbind use default domain
Hello
I'm preparing a new fileserver, based on jessie + sernet 4.2.10
packages. the server is bound to a forest, "AD" where users account are
stored, and subdomains "PSI" for computers and some local accounts
The Active directory forest is managed by 2008R2 servers, with rfc2307
attributs filled for accounts.
I'm using "winbind use default domain" because
2009 Aug 12
1
psi not functioning in nlrob?
Hi all,
I'm trying to fit a nonlinear regression by "nlrob":
model3=nlrob(y~a1*x^a2,data=transient,psi=psi.bisquare,
start=list(a1=0.02,a2=0.7),maxit=1000)
However an error message keeps popping up saying that the function
psi.bisquare doesn't exist.
I also tried psi.huber, which is supposed to be the default for nlrob:
model3=nlrob(y~a1*x^a2,data=transient,psi=psi.huber,
2010 May 24
2
How to set parameters constraints in a function?
Dear R list,
I have a function specifying my log-likelihood, and now I need to set the
constraint that *alpha > kappa*, could anyone help me with setting this in
my function?
the function is defined as follows:
mll <- function(param){
n <- length(x)
psi <- numeric(n)
psi[1] <- 1.0
a0 <- exp(param[1]); a1 <-exp(param[2]); b1 <- exp(param[3]); *alpha *<-
2011 May 12
1
Maximization of a loglikelihood function with double sums
Dear R experts,
Attached you can find the expression of a loglikelihood function which I
would like to maximize in R.
So far, I have done maximization with the combined use of the
mathematical programming language AMPL (www.ampl.com) and the solver
SNOPT (http://www.sbsi-sol-optimize.com/manuals/SNOPT%20Manual.pdf).
With these tools, maximization is carried out in a few seconds. I wonder
if that
2019 Feb 27
2
RFC: Getting ProfileSummaryInfo and BlockFrequencyInfo from various types of passes under the new pass manager
Hi all,
To implement more profile-guided optimizations, we’d like to use
ProfileSummaryInfo (PSI) and BlockFrequencyInfo (BFI) from more passes of
various types, under the new pass manager.
The following is what we came up with. Would appreciate feedback. Thanks.
Issue
It’s not obvious (to me) how to best do this, given that we cannot request
an outer-scope analysis result from an inner-scope
2019 Mar 13
2
RFC: Getting ProfileSummaryInfo and BlockFrequencyInfo from various types of passes under the new pass manager
Overall seems fine to me.
On 3/11/19 8:12 PM, Hiroshi Yamauchi wrote:
> Here's a revised approach based on the discussion:
>
> - Cache PSI right after the profile summary in the IR is written in
> the pass pipeline. This would avoid the need to insert
> RequireAnalysisPass for PSI before each non-module pass that needs it.
> PSI can be technically invalidated but unlikely
2009 Aug 17
2
Newbie that don't understand R code
I got some R code that I don't understand.
Question as comment in code
//where is t comming from, what is phi inverse
rAC <- function(name, n, d, theta){
#generic function for Archimedean copula simulation
illegalpar <- switch(name,
clayton = (theta < 0),
gumbel = (theta < 1),
frank = (theta < 0),
BB9 = ((theta[1] < 1) | (theta[2] < 0)),
GIG = ((theta[2] < 0) |
2019 Mar 13
1
RFC: Getting ProfileSummaryInfo and BlockFrequencyInfo from various types of passes under the new pass manager
On 3/14/19 2:04 AM, Hiroshi Yamauchi wrote:
>
>
> On Wed, Mar 13, 2019 at 2:37 PM Fedor Sergeev <fedor.sergeev at azul.com
> <mailto:fedor.sergeev at azul.com>> wrote:
>
>>
>> - Add a new proxy ModuleAnalysisManagerLoopProxy for a loop pass
>> to be able to get to the ModuleAnalysisManager in one step and
>> PSI through it.
>
2007 Oct 13
2
the use of the .C function
Dear All,
could someone please shed some light on the use of the .C or .Fortran function:
I am trying load and running on R the following function
// psi.cpp -- psi function for real arguments.
// Algorithms and coefficient values from "Computation of Special
// Functions", Zhang and Jin, John Wiley and Sons, 1996.
//
// (C) 2003, C. Bond. All rights reserved.
//
//
2011 Nov 18
1
number of items to replace is not a multiple of replacement length
Hi all, following is my R -code and shows the error given below
> n <- 100
> k<-2
> x1 <-c(1, 3);x2 <- c(2,5)
> X <- matrix(c(0,0), nrow = 2, ncol = n)
> for(i in 1:k)
+ X[i, ] <- mh1.epidemic(n,x1[i],x2[i])
Error in X[i, ] <- mh1.epidemic(n,x1[i],x2[i]):
number of items to replace is not a multiple of replacement length
> psi <-t(apply(X, c(1,2),
2008 Sep 06
1
Help use try function with boot
Hi R users,
Is is possible for me to use the try function with boot? I would to do
the bootstraping with a nonlinear model(it works well when R < 1000).
But it does not work very well (when R is large) thus I try to use
"try" to resolve. I put the try function in two cases:
case1: put the try in front of the boot
> c1.try<-try(boot(c1data, statistic = c1.fun,
2019 Mar 04
2
RFC: Getting ProfileSummaryInfo and BlockFrequencyInfo from various types of passes under the new pass manager
On 3/4/19 10:49 PM, Hiroshi Yamauchi wrote:
>
>
> On Mon, Mar 4, 2019 at 10:55 AM Hiroshi Yamauchi <yamauchi at google.com
> <mailto:yamauchi at google.com>> wrote:
>
>
>
> On Sat, Mar 2, 2019 at 12:58 AM Fedor Sergeev
> <fedor.sergeev at azul.com <mailto:fedor.sergeev at azul.com>> wrote:
>
>
>
> On 3/2/19 2:38 AM,