Displaying 20 results from an estimated 800 matches similar to: "My R code is not efficient"
2009 Jan 28
3
initial value in 'vmmin' is not finite
Dear r helpers
I run the following code for nested logit and got a message that
Error in optim(c(0, 0, 0, 0, 0.1, -2, -0.2), fr, hessian = TRUE, method = "BFGS") : initial value in 'vmmin' is not finite
What does this mean? and how can I correct it?
Thank you
June
> yogurt = read.table("yogurtnp.csv", header=F,sep=",")> attach(yogurt)>
2009 Mar 02
1
initial gradient and vmmin not finite
Dear Rhelpers
I have the problem with initial values, could you please tell me how to solve it?
Thank you
June
> p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2)))
Error in maxRoutine(fn = logLik, grad = grad, hess = hess, start = start, :
NA in the initial gradient
> p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2),method="BFGS"))
Error in optim(start, func, gr =
2012 Dec 15
3
interfacing with .Call
Hi
My code is as following:
#include <R.h>
#include <Rinternals.h>
//* the Projector part *//
void Projector(double *L, int *dimL, double *G, int *dimG, double *W, int
*dimW, int *xymod, int *dimxy, double *modif, int *dimif, double *Lsum)
{ ...}
//* the interface part *//
#define getDim(A) INTEGER(coerceVector(getAttrib(A,R_DimSymbol), INTSXP))
SEXP Projector5(SEXP L, SEXP G,
2002 Sep 08
2
Printing via smbprint to a WinPrinter
Hi all.
I would like to print from a Linux Server to a printer connected to a Windows ME machine. I'm able to connect via smbclient, with
smbclient //windowsme/printer -U '' -N
and I receive the smb> prompt
Now, when I try to print any file, nothing comes out from the printer. The printer is a Canon LBP-810 which, according to
www.linuxprinting.org site, is a WinPrinter. My
2002 May 04
1
Can't print from applications in W2K to Samba (version 2.2.3a, Debian woody)
Dear all
I am currently setting up a Samba server and am experiencing a bit of a
problem with printing:
I have a Canon LBP-1000 connected to the Samba server via the parallel
port. Printing directly from the machine works fine. Printing to the
printer directly attached to my W2K client works fine, too. When I try
to print from the W2K client to the printer connected to the Samba
server, however,
2007 Oct 26
5
help
hello,
please can anyone help me out. Am a new user of R
program. Am having problem
with this code below, not getting the expected
results.
1. Each m, the cumulative sum should be 1.000 but the
2nd and 3rd m returned 2.000 and 3.000
instead of 1.000.
2. to get the LCL(m) and UCL(m) for each m base on
these instructions
if out.cum > 0.025 then LCL(m)= y-1
if out.cum >0.975
2011 Aug 17
1
multinomRob - error message
Hi,
I would like to use the multinomRob function to test election results.
However, depending on which independent variables I include and how
many categories I have in the dependent variable, the model cannot be
estimated.
My data look like this (there are 68 observations):
> head(database)
RESTE09 GAUCHE09 PDC09 PLR09 UDC09 MCG09 RESTE05 GAUCHE05 PDC05
D1 1455
2007 Oct 29
2
help please
hello,
please can anyone help me out. Am a new user of R
program. Am having problem
with this code below, not getting the expected
results.
Each m, the cumulative sum should be 1.000 but the
2nd and 3rd m returned 2.000 and 3.000
instead of 1.000.
thanks
Aruike
pp=function(x,n,M){z=1.0;a=2.3071430;b=7.266064;H=3
out.h=c()
out.y=c()
out.m=c()
out.prob=c()
2005 Jul 03
2
over/under flow
I am porting some FORTRAN to R in which an Inf triggers an if(). The
trigger is infinite on exp(lgamma(OVER)). What is the canonical R
style of determining OVER when exp(OVER)== Inf? The code structure
that I am
porting is best left intact--so I need to query R somehow to the value
of OVER that causes exp(lgamma(OVER)) to equal Inf.
On my system,
exp(lgamma(171)) is about first to equal Inf.
2006 Jul 22
1
ifelse command
Dear:
I try to revise the maximum likelihood function below using something constrains. But it seems something wrong with it. Becasue R would not allow me to edit the function like this. It is very appreciate if you can help.
function (parameters,y,x1,x2)
{
p<-parameters[1]
alpha1<-parameters[2]
beta1<-parameters[3)]
delta1<-parameters[4]
alpha2<-parameters[5]
2009 Apr 22
2
integrate lgamma from 0 to Inf
Dear R users,
i try to integrate lgamma from 0 to Inf. But here i get the message "roundoff error is detected in the extrapolation table", if i use 1.0e120 instead of Inf the computation works, but this is against the suggestion of integrates help information to use Inf explicitly. Using stirlings approximation doesnt bring the solution too.
## Stirlings approximation
lgammaApprox
1998 Sep 10
2
R-beta: trouble compiling 0.62.3 on SunOS 4.1.4: lgamma conflicts
I've recently tried to get 0.62.3 up on our Suns (4.1.4, using gcc; I'm
also having trouble with a Solaris 2.6 compile but I haven't given up hope
on that one yet) -- the last compile I did was 0.61.1, which worked
smoothly.
Running
./configure --prefix=/usr/local/apps/R/R-0.62.3 [--with-g77]
(tried both with and without g77, eventually get to the same place),
I get a conflict
2004 Mar 22
1
printing with option problem
I have configured samba as printer server for a Canon LBP-1760e Laser
printer. All works perfectly except when I use the printer option "2 pages per
sheet". I can see the smbprn.xxxxxx file in the spool directory but it is
removed before beeing printed, then in the log file I can read the message :
"can't open file 'smbprn.xxxxx' no such file or directory".
I have
2008 Apr 18
3
help me to debug this part of code?
I am trying to solve the integration equation, for different values of K from
4 to 25, the integration is with respect to u,
Here is the equation: gamma(k/2) / ( sqrt(k-1)*gamma((k-1)/2) ) *
integrate(f= (1+u^2/k-1)^(-k/2), lower=0, upper= sqrt(a^2*k/(k+1-a^2)) ) =
the similar expression as te left hand except k becomes k+1
my code is below, I don't know why R keep telling me the syntax
2004 Jun 26
1
S4 group "Math", "getGroupMembers", "genericForPrimitive"
Hi,
I found the following on Windows 2000/NT
R Version 1.9.1 (2004-06-21) (also Version 1.9.0):
The S4 group "Math" doesn't work as documented; i.e., "log", "log10",
"gamma" and "lgamma" are included
in the documentation but don't work. See example code below.
Moreover, what about 'genericForPrimitive' which is used
in
2019 Jun 24
1
Calculation of e^{z^2/2} for a normal deviate z
>>>>> jing hua zhao
>>>>> on Mon, 24 Jun 2019 08:51:43 +0000 writes:
> Hi All,
> Thanks for all your comments which allows me to appreciate more of these in Python and R.
> I just came across the matrixStats package,
> ## EXAMPLE #1
> lx <- c(1000.01, 1000.02)
> y0 <- log(sum(exp(lx)))
> print(y0) ## Inf
2014 Sep 22
2
Replace isnan and lgamma in Fortran subroutine in R package
Hello,
I submitted a package which used Fortran functions isnan and lgamma. However, I was told that:
isnan and lgamma are not Fortran 95 functions.
I was asked to write 'cross-platform portable code' and so should not be writing GNU extensions to Fortran.
See http://cran.r-project.org/web/checks/check_results_mpath.html, which will shortly show installation failures under Solaris.
I
2006 Jul 22
1
Why the contrain does not work for selecting a particular range of data?
Dear:
Continuing the issue of 'ifelse'! I selecting the data whose 'x2'=1 for maximizing likelihood. I used two way to do this but the results are different.
1.Way one I use the data for x2=1 and run the program. It works for me. Tthe program is described as below:
function (parameters,y1,x11)
{
p<-parameters[1]
alpha1<-parameters[2]
beta1<-parameters[3]
2003 Jan 22
1
negative multinomial regression models
Hello,
I''ve spent a lot of time during the past month trying to get negative
multinomial regression models for clustered event counts as described in
(Guang Guo. 1996. "Negative Multinomial Regression Models For Clustered
Event Counts." Sociological Methodology 26: 113-132., abstract at
http://depts.washington.edu/socmeth2/4abst96.htm) implemented in R. A
FORTRAN version of the
2003 Jan 01
1
Can't change directory to /public (Permission denied)-Illogical error in Samba 2.2.6
The following error occured persistently, when trying to access a world
rw-able directory public from Win2000 (samba version 2.2.6):
(log file:)
[2003/01/01 17:45:57, 0] smbd/service.c:make_connection(597)
harm (192.168.0.3) Can't change directory to /public (Permission denied)
The following is the share in the smb.conf file:
[public]
comment = public share: read & write, no