[R] how to get loglik parameter from splm package?

2011-01-24 Thread zhaowei

splm package is a r  implemention of spatial panel data models.
and the loglik paremeter is most important infomation for splm methods.
but  i found the loglik always been null ,it's craze to get right estimation 
in splm with null  loglik.
Any one knows the splm package and can get the right loglik ? please help
me.

thanks
-- 
View this message in context: 
http://r.789695.n4.nabble.com/how-to-get-loglik-parameter-from-splm-package-tp3234185p3234185.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] how to get loglik parameter from splm package?

2011-01-25 Thread zhaowei

thank  Millo  for your very valuable reply

The political situation in Italy may be better than in  china.
And wish logik function could be supported in FE models too.
If then ,Splm will be more welcome.

thanks for your all works for useR.



Millo Giovanni wrote:
> 
> Dear useR,
> 
> although I admit that getting the log likelihood is important, you must
> concede that obtaining the parameter estimates is not bad either.
> Regarding "craze", well there are crazier things in the world than this,
> just look at the political situation in Italy.
> 
> Anyway, the loglik has always been there, although it wasn't exported
> (hence the NULL value). In the most recent versions of 'splm' we have
> made it available, at least for RE models, through the standard way: a
> logLik() method. Usage:
> 
>> logLik(yourmodel)
> 
> You can download it from R-forge, as usual.
> 
> Best,
> Giovanni
> 
>  original message ------
> 
> Message: 42
> Date: Mon, 24 Jan 2011 06:59:39 -0800 (PST)
> From: zhaowei 
> To: r-help@r-project.org
> Subject: [R] how to get loglik parameter from splm package?
> Message-ID: <1295881179014-3234185.p...@n4.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> splm package is a r  implemention of spatial panel data models.
> and the loglik paremeter is most important infomation for splm methods.
> but  i found the loglik always been null ,it's craze to get right
> estimation 
> in splm with null  loglik.
> Any one knows the splm package and can get the right loglik ? please
> help
> me.
> 
> thanks
> -- 
> View this message in context:
> http://r.789695.n4.nabble.com/how-to-get-loglik-parameter-from-splm-pack
> age-tp3234185p3234185.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> --- end original message -
> 
> Giovanni Millo
> Research Dept.,
> Assicurazioni Generali SpA
> Via Machiavelli 4, 
> 34132 Trieste (Italy)
> tel. +39 040 671184 
> fax  +39 040 671160 
> 
>  
> Ai sensi del D.Lgs. 196/2003 si precisa che le informazi...{{dropped:13}}
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://r.789695.n4.nabble.com/how-to-get-loglik-parameter-from-splm-package-tp3234192p3237303.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Problem of running R console from Java on linux box

2008-10-31 Thread ZhaoWei
Hi the list:

  I can not create R process from Java application with my linux box, 
the process never was created, or just terminated immediately after I
called Runtime.getRuntime().exec(...)

  The command lines I have tried are(the paths are all correct):

  "/bin/sh /usr/bin/R"
  "/bin/sh -c /usr/bin/R"
  "/usr/lib/R/bin/exec/R"(also set R_HOME=/usr/lib/R)

  I also tried ProcessBuilder, which is no help. I'm confused, is this
possible?

Many Thanks!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Problem of running R console from Java on linux box

2008-11-01 Thread ZhaoWei
Great, "--vanilla" works!
Can you please tell me what this parameter means?
And, it works with the execuatble(/usr/lib/R/bin/exec/R). I'm wondering
is it possible to do the same with the shell script(/usr/bin/R), anyway
when you type "R" in command line, it means the shell script.

Thanks again!

> > Hi the list:
> >
> >   I can not create R process from Java application with my linux box, 
> > the process never was created, or just terminated immediately after I
> > called Runtime.getRuntime().exec(...)
> >
> 
> Did you check the error stream? I think you want to start R with a
> command line argument like "--vanilla", without /bin/sh.
> 
> Martin
> 
> >   The command lines I have tried are(the paths are all correct):
> >
> >   "/bin/sh /usr/bin/R"
> >   "/bin/sh -c /usr/bin/R"
> >   "/usr/lib/R/bin/exec/R"(also set R_HOME=/usr/lib/R)
> >
> >   I also tried ProcessBuilder, which is no help. I'm confused, is this
> > possible?
> >
> > Many Thanks!
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> 
> -- 
> Martin Morgan
> Computational Biology / Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N.
> PO Box 19024 Seattle, WA 98109
> 
> Location: Arnold Building M2 B169
> Phone: (206) 667-2793

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Problem of running R console from Java on linux box

2008-11-02 Thread ZhaoWei
Get it done. Big thank, Brian and Martin!


From: Prof Brian Ripley <[EMAIL PROTECTED]>
Subject: Re: [R] Problem of running R console from Java on linux box
Date: Sun, 2 Nov 2008 11:07:24 + (GMT)

> On Sun, 2 Nov 2008, ZhaoWei wrote:
> 
> > Great, "--vanilla" works!
> > Can you please tell me what this parameter means?
> > And, it works with the execuatble(/usr/lib/R/bin/exec/R). I'm wondering
> > is it possible to do the same with the shell script(/usr/bin/R), anyway
> > when you type "R" in command line, it means the shell script.
> 
> It is intended for running the shell script, and it is documented in the 
> most basic manual ('An Introduction to R'), with which you ought to become 
> familiar.
> 
> >
> > Thanks again!
> >
> >>> Hi the list:
> >>>
> >>>   I can not create R process from Java application with my linux box,
> >>> the process never was created, or just terminated immediately after I
> >>> called Runtime.getRuntime().exec(...)
> >>>
> >>
> >> Did you check the error stream? I think you want to start R with a
> >> command line argument like "--vanilla", without /bin/sh.
> >>
> >> Martin
> >>
> >>>   The command lines I have tried are(the paths are all correct):
> >>>
> >>>   "/bin/sh /usr/bin/R"
> >>>   "/bin/sh -c /usr/bin/R"
> >>>   "/usr/lib/R/bin/exec/R"(also set R_HOME=/usr/lib/R)
> >>>
> >>>   I also tried ProcessBuilder, which is no help. I'm confused, is this
> >>> possible?
> >>>
> >>> Many Thanks!
> >>>
> >>> __
> >>> R-help@r-project.org mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-help
> >>> PLEASE do read the posting guide 
> >>> http://www.R-project.org/posting-guide.html
> >>> and provide commented, minimal, self-contained, reproducible code.
> >>
> >> --
> >> Martin Morgan
> >> Computational Biology / Fred Hutchinson Cancer Research Center
> >> 1100 Fairview Ave. N.
> >> PO Box 19024 Seattle, WA 98109
> >>
> >> Location: Arnold Building M2 B169
> >> Phone: (206) 667-2793
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> 
> -- 
> Brian D. Ripley,  [EMAIL PROTECTED]
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel:  +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Problem of running R console from Java on linux box

2008-11-02 Thread ZhaoWei
My fault, I used Runtime.getRuntime.exec("/usr/bin/R --vanilla"), and was
prompted with "/usr/bin/R --vanilla not found". This morning I tried command
with String array, it works.

And, you said "vanilla" is a non-interactive mode, so if I have several R 
scripts to run, I have to evaluate them one by one: create a R process -> foward
the first script to the process through output stream -> close the output 
stream 
& get feed back from inputstream -> close input stream & exit R -> create a new
process to evaluate the next script. 

There is no way to evaluate all commands or scripts in one R process, right?

> ZhaoWei <[EMAIL PROTECTED]> writes:
> 
> > Great, "--vanilla" works!
> > Can you please tell me what this parameter means?
> > And, it works with the execuatble(/usr/lib/R/bin/exec/R). I'm wondering
> > is it possible to do the same with the shell script(/usr/bin/R), anyway
> > when you type "R" in command line, it means the shell script.
> 
> By 'without /bin/sh' I mean you want to start R as
> 
> /usr/bin/R --vanilla
> 
> like
> 
> String[] cmd = new String[] {"/usr/bin/R", "--vanilla"};
> Process proc = java.lang.Runtime.getRuntime().exec(cmd);
> 
> If you do not specify --vanilla, and do
> 
> Process proc = java.lang.Runtime.getRuntime().exec("/usr/bin/R");
> // create byte array 'bytes', then
> proc.getErrorStream().read(bytes)
> // interpret bytes as String
> 
> you'll see the error
> 
>  Fatal error: you must specify '--save', '--no-save' or '--vanilla'
> 
> You need '--vanilla' because you are creating a non-interactive
> process; --vanilla tells the non-interactive process how to start up
> and shut down
> 
> Since the process is not interactive, you can foward bytes to it with
> proc.getOutputStream(), and retrieve results from
> proc.getInputStream() (once the output stream has been closed), but
> you are not interacting with R the way you would at an R prompt.
> 
> Martin
> 
> > Thanks again!
> >
> >> > Hi the list:
> >> >
> >> >   I can not create R process from Java application with my linux box, 
> >> > the process never was created, or just terminated immediately after I
> >> > called Runtime.getRuntime().exec(...)
> >> >
> >> 
> >> Did you check the error stream? I think you want to start R with a
> >> command line argument like "--vanilla", without /bin/sh.
> >> 
> >> Martin
> >> 
> >> >   The command lines I have tried are(the paths are all correct):
> >> >
> >> >   "/bin/sh /usr/bin/R"
> >> >   "/bin/sh -c /usr/bin/R"
> >> >   "/usr/lib/R/bin/exec/R"(also set R_HOME=/usr/lib/R)
> >> >
> >> >   I also tried ProcessBuilder, which is no help. I'm confused, is this
> >> > possible?
> >> >
> >> > Many Thanks!
> >> >
> >> > __
> >> > R-help@r-project.org mailing list
> >> > https://stat.ethz.ch/mailman/listinfo/r-help
> >> > PLEASE do read the posting guide 
> >> > http://www.R-project.org/posting-guide.html
> >> > and provide commented, minimal, self-contained, reproducible code.
> >> 
> >> -- 
> >> Martin Morgan
> >> Computational Biology / Fred Hutchinson Cancer Research Center
> >> 1100 Fairview Ave. N.
> >> PO Box 19024 Seattle, WA 98109
> >> 
> >> Location: Arnold Building M2 B169
> >> Phone: (206) 667-2793
> 
> -- 
> Martin Morgan
> Computational Biology / Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N.
> PO Box 19024 Seattle, WA 98109
> 
> Location: Arnold Building M2 B169
> Phone: (206) 667-2793

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.