Displaying 9 results from an estimated 9 matches for "sex2".
Did you mean:
sex
2005 Oct 27
2
how to predict with logistic model in package logistf ?
dear community,
I am a beginer in R , and can't predict with logistic model in package
logistf,
could anyone help me ? thanks !
the following is my command and result :
>library(logistf)
>data(sex2)
>fit<-logistf(case ~ age+oc+vic+vicl+vis+dia, data=sex2)
>predict(fit,newdata=sex2)
Error in predict(fit, newdata = sex2) : no applicable method for
"predict"
2018 May 08
0
Fitting problem for Cox model with Strata as interaction term
...ata = data) :
X matrix deemed to be singular; variable 2 4 6
> fit1
Call:
coxph(formula = Surv(tstart, time, status) ~ SEX:strata(tgroup),
data = data)
coef exp(coef) se(coef) z p
SEX1:strata(tgroup)tgroup=1 -0.0715 0.9310 0.0524 -1.36 0.17
SEX2:strata(tgroup)tgroup=1 NA NA 0.0000 NA NA
SEX1:strata(tgroup)tgroup=2 -0.2624 0.7692 0.0655 -4.01 6.1e-05
SEX2:strata(tgroup)tgroup=2 NA NA 0.0000 NA NA
SEX1:strata(tgroup)tgroup=3 -0.0309 0.9696 0.0761 -0.41 0.68
SEX2:strata(tgroup)tgroup=3...
2008 Sep 06
2
Hopefully an easy error bar question
...(c(xv[i],xv[i]),c(yv[i]+z[i],yv[i]-z[i]))
lines(c(xv[i]-g,xv[i]+g),c(yv[i]+z[i], yv[i]+z[i]))
lines(c(xv[i]-g,xv[i]+g),c(yv[i]-z[i], yv[i]-z[i]))
}}
Have then worked out the standard errors and added that using:
se<-c()
and then added the final bit of code:
labels<-as.character(levels(Sex2))
ybar<-as.vector(tapply(Height2,Sex2,mean))
error.bars(ybar,se,labels)
So i was wondering, in order to get error bars on my barplot with two levels do i need to change the last bit of code. For example im looking at mean body condition (y) against age (x) and sex (level), i tried to change the...
2003 Dec 17
5
beginner programming question
...problem for which I have found
a solution, but I feel it is a rather poor one. I wonder if there's some
other (more clever) solution, using (maybe?) vectorization or
subscripting.
A toy example would be:
rel1 rel2 rel3 age0 age1 age2 age3
sex0 sex1 sex2 sex3
1 3 NA 25 23 2 NA
1 2 1 NA
4 1 3 35 67 34 10
2 2 1 2
1 4 4 39 40 59 60
1...
2005 Jul 18
1
Survival dummy variables and some questions
...ng appears to have done so ...)
and turn the variables into factors and then try the analysis.
E.g.,
Dataset <- read.table("categ.dat", header=TRUE)
Dataset$eventbefore2c <- factor(Dataset$eventbefore)
.. other IVs here
...
surv.mod1 <- coxph(Surv(start, stop, event) ~ sex2 + ageonset2c +
eventbefore2c + daysbefore2c, data=Dataset)
Strangely enough, I receive a warning message when the variables are
treated in this way: X matrix deemed to be singular; variable 11 in:
coxph(Surv(start, stop, event) ~ sex2 + ageonset2c + eventbefore2c +
I don’t receive any wa...
2009 Oct 11
3
Error in family$family : $ operator is invalid for atomic vectors
Dear List,
I'm having problem with an exercise from The R book (M.J. Crawley) on page
567.
Here is the entire code upto the point where I get an error.
data(UCBAdmissions)
x <- aperm(UCBAdmissions, c(2, 1, 3))
names(dimnames(x)) <- c("Sex", "Admit?", "Department")
ftable(x)
fourfoldplot(x, margin = 2)
dept<-gl(6,4)
sex<-gl(2,1,24)
2004 Oct 07
3
Remove Indeterminate Level
Hi,
I have imported some data to R from stata and my factor variables have
an Indeterminate level which I don't really want. For example the
variable sex has the levels Male, Female and Indeterminate. There are
no 'Indeterminate' values in the data. Can somebody tell me how to get
rid of this level as it restricting my cox ph model.
Thanks
Neil
2011 May 05
0
Conditional distribution plot using Model-based Recursive Partitioning
Hello,
I am using the party module to estimate the relationship between the
probability of being a student and number of siblings (alive). However, I
need to include a number of relevant covariates. My code is below:
fm3 <- mob(Student ~ age + alive + sex2 + cwa + cha + cym | Religion+Servant
+ Literacy, control = ctrl, data = samp2, model = glinearModel, family
=binomial())
plot(fm3, tp_args = list(which = "alive"),tnex = 2, type = "simple" )
Which works fine. However, the plots generated do not show the conditional
relationship...
2009 Sep 01
1
Logistic Politomic Regression in R
...<cnaberdl@gmail.com>
Subject: [R] Meaning of data set variables
To: r-help@r-project.org
Message-ID:
<699bb6720908300725l6162ce2dg59b7c2fa78f72d6a@mail.gmail..com>
Content-Type: text/plain
Hi all,
Does anybody know the meaning of the values 0 - 1, for each variable from
data "sex2" avaible from the package "logistf"?
Thanks in advance.
Best,
Caio
[[alternative HTML version deleted]]
------------------------------
Message: 8
Date: Sun, 30 Aug 2009 16:30:41 +0200
From: Uwe Ligges <ligges@statistik.tu-dortmund.de>
Subject: Re: [R] Meaning of dat...