Displaying 8 results from an estimated 8 matches for "leffgh".
Did you mean:
efgh
2007 Nov 12
2
how to extract the original data of a glm object
my function is
glm(a~log(b)+c+d+e,family=binomial,data=f)->aa
I want to extract the original data set of aa. How to do it ?
You may suggest the model.frame() function. In fact ,i have tried it.
model.frame returns a data frame of containing a,log(b) NOT b,c,d,e
I want to extract a data frame containing a,b,c,d,e,which is exactly the
same as "f"
How can I achieve this
2007 Nov 13
1
a very easy question, how to extract the name of the response variable
...the object created by the call to glm():
form <- qq["formula"] or equivalently form <- qq$formula
then apply the function all.vars() to the result, and return the first
element
variables.in.formula <- all.vars(form)
variables.in.formula[1] # will be the response variable
leffgh wrote:
>
> for example
> glm(a~b+c+d,data=eee)->qq
>
> Is there a function able to return the name of the response variable?
> suppose "ff" is the function satisfying this need,
> ff(qq) then "a" (Not the value of a) will be returned.
> could you tel...
2007 Nov 12
2
how to randomize a vector
I have a vector whose length is nearly 70 thousand.
I need randomize it for 1000 times .
for randomizing , I mean ,the elements of the vector remain intact while
their order in the vector get changed randomly.
I have written a function which seems to be able to solve short vectors ,
but waste a lot of time when dealing with the the long vector mentioned
above.
--
View this message in context:
2007 Dec 11
2
the observed "log odds" in logistic regression
Dear list:
After reading the following two links:
http://luna.cas.usf.edu/~mbrannic/files/regression/Logistic.html
http://www.tufts.edu/~gdallal/logistic.htm
I've known the mathematical basis for logistic regression.However I am
still not so sure about the "logit "
For a categorical independent variable, It is easy to understand the
procedures how "log
2007 Nov 21
0
How to extract the Deviance of a glm fit result
dear List:
glm(a~b+c,family=binomial,data=x)->fit
deviance(fit) returns the same as the residual deviance.
I don't not know much about logistic regression.Some book tells that:
"
Deviance (likelihood ratio statistic):
Deviance = -2log( likelihoodof the currentmodel /likelihoodof thesaturated
model)
Note:
(1). The current model is the model of interest.
(2). The saturated model
2007 Dec 06
1
logistic regression using "glm",which "y" is set to be "1"
Dear friends :
using the "glm" function and setting family=binomial, I got a list of
coefficients.
The coefficients reflect the effects of predicted variables on the
probability of the response to be "1".
My response variable consists of "A" and "D" . I don't know which level of
the response was set to be 1.
is the first element of the response set
2008 Apr 29
2
how to find the minimum
Dear friends:
I am a new R user, and not very good at statistics and maths
I find it difficult to find the minimum of this item:
((p*(b-1)-1)*(p+1)^(b-1)+1)/p^2
It seems that the method optim can find the minimum. I tried several
times , but R constanly tells that " failure to find b or p"
Would you please give some suggestions?
Thanks in advance.
Best
2007 Dec 07
1
paradox about the degree of freedom in a logistic regression model
Dear all:
"predict.glm" provides an example to perform logistic regression when the
response variable is a tow-columned matrix. I find some paradox about the
degree of freedom .
> summary(budworm.lg)
Call:
glm(formula = SF ~ sex * ldose, family = binomial)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.39849 -0.32094 -0.07592 0.38220 1.10375