That's a bit harsh.
Isn't the best advice here, to post a reproducible example...
Which I believe has been mentioned.
Also, I'd strongly encourage people to use package+function name, for
this sort of thing.
stats::glm
As there are many R functions for GLMs...
On Sun, Aug 2, 2020 at 12:47
On 2/08/20 5:39 am, Paul Bernal wrote:
Dear friends,
Hope you are doing great. I want to fit a logistic regression in R, where
the dependent variable is the covid status (I used 1 for covid positives,
and 0 for covid negatives), but when I ran the glm, R complains that I
should make the depen
On 2020-08-01 15:52 -0400, Matthew McCormack wrote:
| On 8/1/20 1:13 PM, Jeff Newmiller wrote:
| | On August 1, 2020 4:01:08 AM PDT, Anas Jamshed wrote:
| | | I performed this in GEO2R and find
| | | R script there and Runs R script
Anas, how did you come up with this
script at all by reading t
I like using a logical response in cases like this, but put its
construction in the formula so it is unambiguous when I look at the
results later.
> d <- data.frame(Covid=c("Pos","Pos","Neg","Pos","Neg","Neg"), Age=41:46)
> glm(family=binomial, data=d, Covid=="Pos"~Age)
Call: glm(formula = Covid
As with the previous post, I agree that Bioconductor will be a better
place to ask this question.
As a quick thought you also might try to adjust the p-value in the last
line:
DEGs = subset(tT, P.Value < 0.01 & abs(logFC) > 2). You could play
around with the P.Value, 0.01 is pretty low, you co
Hello,
Inline.
Às 20:01 de 01/08/2020, John Fox escreveu:
Dear Paul,
I think that this thread has gotten unnecessarily complicated. The
answer, as is easily demonstrated, is that a binary response for a
binomial GLM in glm() may be a factor, a numeric variable, or a
logical variable, with i
I didn't mean to imply that was the only time that it was required, only
that it's not universal in R.
On Sat, Aug 1, 2020 at 2:22 PM Bert Gunter wrote:
> ... yes, but so does lm() for a categorical **INdependent** variable with
> more than 2 numerically labeled levels. n levels = (n-1) df for
Hello,
From the documentation, help('glm'):
Details
A typical predictor has the form|response ~ terms|where|response|is the
(numeric) response vector and|terms|is a series of terms which specifies
a linear predictor for|response|.
For|binomial|and|quasibinomial|families the response ca
Dear Paul,
I think that this thread has gotten unnecessarily complicated. The
answer, as is easily demonstrated, is that a binary response for a
binomial GLM in glm() may be a factor, a numeric variable, or a logical
variable, with identical results; for example:
--- snip ---
You appear to be confusing a binomial **response** with categorical
"dependent variables." glm() of course fits continuous or categorical
dependent variables. If a continuous dependent variable has only 2 values,
the results for glm() will be the same whether or not it is considered to
be continuou
No, R does not. glm() does in order to do logistic regression.
On Sat, Aug 1, 2020 at 2:11 PM Paul Bernal wrote:
> Hi Bert,
>
> Thank you for the kind reply.
>
> But what if I don't turn the variable into a factor. Let's say that in
> excel I just coded the variable as 1s and 0s and just importe
... and further:
" If a continuous independent variable has only 2 values,..."
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, Aug 1, 2020 at 11:11 AM Bert
Sorry, typo.My first sentences should read:
"You appear to be confusing a binomial **response** with categorical
"independent variables." glm() of course fits continuous or categorical
independent variables."
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
Dear friend,
I am aware that I have a binomial dependent variable, which is covid status
(1 if covid positive, and 0 otherwise).
My question was if R requires to turn a binomial response variable into a
factor or not, that's all.
Cheers,
Paul
El sáb., 1 de agosto de 2020 1:22 p. m., Bert Gunte
... yes, but so does lm() for a categorical **INdependent** variable with
more than 2 numerically labeled levels. n levels = (n-1) df for a
categorical covariate, but 1 for a continuous one (unless more complex
models are explicitly specified of course). As I said, the OP seems
confused about whet
Hi Bert,
Thank you for the kind reply.
But what if I don't turn the variable into a factor. Let's say that in
excel I just coded the variable as 1s and 0s and just imported the dataset
into R and fitted the logistic regression without turning any categorical
variable or dummy variable into a fact
On Sat, 1 Aug 2020, Paul Bernal wrote:
Hope you are doing great. I want to fit a logistic regression in R, where
the dependent variable is the covid status (I used 1 for covid positives,
and 0 for covid negatives), but when I ran the glm, R complains that I
should make the dependent variable a f
x <- factor(0:1)
x <- factor("yes","no")
will produce identical results up to labeling.
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, Aug 1, 2020 at 10
Basically I want to redo the methodology of the paper:
https://www.nature.com/articles/s41598-018-23492-2
I choose microarray data GSE75693 of 30 patients with stable kidney
transplantation and 15 with BKVN to identify differentially expressed genes
(DEGs). I performed this in GEO2R and find R scri
Dear friends,
Hope you are doing great. I want to fit a logistic regression in R, where
the dependent variable is the covid status (I used 1 for covid positives,
and 0 for covid negatives), but when I ran the glm, R complains that I
should make the dependent variable a factor.
What would be more
https://www.bioconductor.org/help/
On August 1, 2020 4:01:08 AM PDT, Anas Jamshed
wrote:
>I choose microarray data GSE75693 of 30 patients with stable kidney
>transplantation and 15 with BKVN to identify differentially expressed
>genes
>(DEGs). I performed this in GEO2R and find R script there a
I choose microarray data GSE75693 of 30 patients with stable kidney
transplantation and 15 with BKVN to identify differentially expressed genes
(DEGs). I performed this in GEO2R and find R script there and Runs R script
Successfully on R studio as well. The R script is :
# Differential expression
22 matches
Mail list logo