[R] variable selection problem

2016-11-23 Thread Anderson Eduardo
Hello

I am trying to run vignette

example for the MaxentVariableSelection package, but something wrong is
happening. I can't figure out.

Here is the code:

maxentPath = ("/home/anderson/R/x86_64-pc-linux-gnu-library/3.3/dismo/
java/maxent.jar")
gridfolder <- ("/home/anderson/Downloads/BioOracle_9090RV")
occurrencelocations <- system.file("extdata", "Occurrencedata.csv",package="
MaxentVariableSelection")
backgroundlocations <- system.file("extdata", "Backgrounddata.csv",package="
MaxentVariableSelection")
additionalargs="nolinear noquadratic noproduct nothreshold noautofeature"
contributionthreshold <- 5
correlationthreshold <- 0.9
betamultiplier=seq(2,6,0.5)

VariableSelection(maxent,
  outdir,
  gridfolder,
  occurrencelocations,
  backgroundlocations,
  additionalargs,
  contributionthreshold,
  correlationthreshold,
  betamultiplier
  )

Aand the error message:

> VariableSelection(maxent,
+   outdir,
+   gridfolder,
+   occurrencelocations,
+   backgroundlocations,
+   additionalargs,
+   contributionthreshold,
+   correlationthreshold,
+   betamultiplier
+   )
---
Choosing betamultiplier  2

 Number of remaining variables 4
Testing variable contributions...
Calculating average AUC values from 10 maxent models...
arguments 'show.output.on.console', 'minimized' and 'invisible' are for
Windows only
Error in as.vector(x, "character") :
  cannot coerce type 'closure' to vector of type 'character'


I have not found the solution in blogs and online forums and I would ask
earnestly the help of the members of this forum.

Thanks in advance.

Anderson A. Eduardo

--
Lattes  | Researcher ID
 | Google Acadêmico
 | Site


--

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] MaxentVariableSelection problem

2016-11-02 Thread Anderson Eduardo
Hello

I am trying to run vignette

example for the MaxentVariableSelection package, but something wrong is
happening. I can't figure out.

Here is the code:

maxentPath =
("/home/anderson/R/x86_64-pc-linux-gnu-library/3.3/dismo/java/maxent.jar")
gridfolder <- ("/home/anderson/Downloads/BioOracle_9090RV")
occurrencelocations <- system.file("extdata",
"Occurrencedata.csv",package="MaxentVariableSelection")
backgroundlocations <- system.file("extdata",
"Backgrounddata.csv",package="MaxentVariableSelection")
additionalargs="nolinear noquadratic noproduct nothreshold noautofeature"
contributionthreshold <- 5
correlationthreshold <- 0.9
betamultiplier=seq(2,6,0.5)

VariableSelection(maxent,
  outdir,
  gridfolder,
  occurrencelocations,
  backgroundlocations,
  additionalargs,
  contributionthreshold,
  correlationthreshold,
  betamultiplier
  )

Aand the error message:

> VariableSelection(maxent,
+   outdir,
+   gridfolder,
+   occurrencelocations,
+   backgroundlocations,
+   additionalargs,
+   contributionthreshold,
+   correlationthreshold,
+   betamultiplier
+   )
---
Choosing betamultiplier  2

 Number of remaining variables 4
Testing variable contributions...
Calculating average AUC values from 10 maxent models...
arguments 'show.output.on.console', 'minimized' and 'invisible' are for
Windows only
Error in as.vector(x, "character") :
  cannot coerce type 'closure' to vector of type 'character'


I have not found the solution in blogs and online forums and I would ask
earnestly the help of the members of this forum.

Thanks in advance.

Anderson A. Eduardo
--
Lattes  | Researcher ID
 | Google Acadêmico
 | Site

--

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] GLM output problem

2016-09-01 Thread Anderson Eduardo
Embarrassing but that's true. I wrote 'binamial' instead of 'binomial'. I
tried now with the correct spelling and everything is ok, in fact.


> summary(GLM)

Call:
glm(formula = model, family = binomial(link = logit))

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -18.575010.7646  -1.726   0.0844 .
x 5.0403 2.7757   1.816   0.0694 .
I(x^2)   -0.2845 0.1558  -1.826   0.0679 .



Thank you all.

Anderson Eduardo


2016-09-01 5:14 GMT-03:00 peter dalgaard <pda...@gmail.com>:

> >> And use the parameters returned by GLM to contruct an equation for the
> >> regression model:
> >>
> >> model.eq = -0.446078 + 0.267673*x - 0.014577*I(x^2)
> >
> > ## Not what I got with your data. I got:
> >
> > Coefficients:
> > (Intercept)x   I(x^2)
> >   -18.5750   5.0403  -0.2845
> >
> >
> > I suspect you had some other x,y variables lying around when you
> > defined your model.
>
>
> More likely, the family= specification got lost and gaussian family
> implied:
>
> > glm(model)
>
> Call:  glm(formula = model)
>
> Coefficients:
> (Intercept)x   I(x^2)
>-0.44608  0.26767 -0.01458
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd@cbs.dk  Priv: pda...@gmail.com
>
>
>
>
>
>
>
>
>
>


-- 
Anderson A. Eduardo
--
Lattes <http://lattes.cnpq.br/3826166230581311> | Researcher ID
<http://orcid.org/-0001-8045-8043> | Google Acadêmico
<https://scholar.google.com.br/citations?user=oOUjq9IJ=pt-BR> | Site
<http://andersonaireseduardo.xpg.uol.com.br/>
--

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] GLM output problem

2016-08-31 Thread Anderson Eduardo
Hello

I have started to work with GLM and I am facing the following problem:

If I take:

y = c(0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0)
x = 1:18

model = y ~x + I(x^2)
GLM = glm(model, family=binamial(link = logit))

And use the parameters returned by GLM to contruct an equation for the
regression model:

model.eq = -0.446078 + 0.267673*x - 0.014577*I(x^2)

And backtransform it from the logit to the natural scale (using the inverse
link-function for this case):

model.proj = exp(model.eq)/(1+exp(model.eq))

the plot for model.proj~x is not the same of the plot for fitted(GLM)~x
(see the output attached).

Why is this happening? Can someone help me?

Regards,

Anderson Eduardo

 --
Anderson A. Eduardo
--
Lattes <http://lattes.cnpq.br/3826166230581311> | Researcher ID
<http://orcid.org/-0001-8045-8043> | Google Acadêmico
<https://scholar.google.com.br/citations?user=oOUjq9IJ=pt-BR> | Site
<http://andersonaireseduardo.xpg.uol.com.br/>
--
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.