Displaying 13 results from an estimated 13 matches for "sexfemale".
2010 Oct 18
1
Question about lme (mixed effects regression)
Hello!
If I run this example:
library(nlme)
fm1 <- lme(distance ~ age+Sex, Orthodont, random = ~ age + Sex| Subject)
If I run:
summary(fm1)
then I can see the fixed effects for age and sex (17.7 for intercept,
0.66 for age, and -1.66 for SexFemale)
If I run:
ranef(fm1)
Then it looks like it's producing the random effects for each subgroup
(in this example - each subject). For example, for MO1 it's:
1.25 for intercept, 0.106 for age, and -1.52 for SexFemale.
So, in order to get the the total effects, i.e., the regression
equation, f...
2003 Mar 15
1
formula, how to express for transforming the whole model.matrix, data=Orthodont
Hi, R or S+ users,
I want to make a simple transformation for the model,
but for the whole design matrix.
The model is distance ~ age * Sex, where Sex is a
factor. So the design matrix may look like the
following:
(Intercept) age SexFemale age:SexFemale
1 1 8 0 0
2 1 10 0 0
3 1 12 0 0
4 1 14 0 0
5 1 8 0 0
6 1 10 0 0
7 1 12...
2002 Jan 12
1
Question about mixed-effects models example (Pinheiro and Bates)
...Plus, 2000, pp. 135-137).
One thing I don't understand is:
When I run the command
fm1Orth.lm <- lm( distance ~ age, Orthodont )
followed by
fm2Orth.lm <- update( fm1Orth.lm, formula = distance ~ Sex*age )
and then do
summary(fm2Orth.lm)
in the output, there's "SexFemale" instead of "Sex" (see below). Why?
Call:
lm(formula = distance ~ Sex + age + Sex:age, data = Orthodont)
Residuals:
Min 1Q Median 3Q Max
-5.6156 -1.3219 -0.1682 1.3299 5.2469
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 16...
2010 Jun 22
2
xyplot: adding pooled regression lines to a paneled type="r" plot
...also show in each panel the pooled OLS regression line for
each Sex in the corresponding panel,
generated by the following model:
Ortho.OLS <- lm(distance ~ age * Sex, data=Orthodont)
Sex is a factor, with Male=0, so the coefficients are:
> coef(Ortho.OLS)
(Intercept) age SexFemale age:SexFemale
16.3406250 0.7843750 1.0321023 -0.3048295
I anticipate wanting to fit other models to these data, and also
displaying the model-predicted
regression lines in the same or similar plot, e.g., for a simple linear
mixed model:
Ortho.MLM <- lme(distance ~ age * Sex, da...
2008 Dec 12
1
How can we predict differences in a slope, given that the random component was significant?
Dear R users,
Using R lme function, I found that both fixed and random effects of variable
A on variable B are significant. Now, I'd like to analyze what variables
are predicting differences in the slope. In other words, I'd like to know
what variables (e.g., variable C) are predicting individual differences in
the effects of A on B. I have many data points for A and B for each
2005 Nov 25
0
multiple imputation of anova tables
....7563
Random effects:
Formula: ~1 | Subject
(Intercept) Residual
StdDev: 1.807425 1.431592
Fixed effects: distance ~ age + Sex
Value Std.Error DF t-value p-value
(Intercept) 17.706713 0.8339225 80 21.233044 0.0000
age 0.660185 0.0616059 80 10.716263 0.0000
SexFemale -2.321023 0.7614168 25 -3.048294 0.0054
Correlation:
(Intr) age
age -0.813
SexFemale -0.372 0.000
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-3.74889609 -0.55034466 -0.02516628 0.45341781 3.65746539
Number of Obs...
2011 Sep 29
0
geeglm estimates and standard deviation are too large
...Estimate Std.err Wald Pr(>|W|)
(Intercept) 3.07e+16 7.20e+14 1821.29 0.00000
age 6.38e+13 2.22e+13 8.24 0.00409
RACEBlack 1.48e+16 6.28e+14 555.35 0.00000
RACEOther -1.84e+16 6.17e+14 887.78 0.00000
SEXFemale 1.84e+16 5.23e+14 1235.19 0.00000
FEVERYes -4.41e+15 4.74e+14 86.73 0.00000
FEVERUnknown 1.76e+16 1.60e+15 120.55 0.00000
compared to the estimates from the glm model:
Estimate Std. Error z value Pr(>|z|)
(Intercept)...
2004 Oct 16
3
Cox PH Warning Message
Hi,
Can anybody tell me what the message below means and how to overcome it.
Thanks,
Neil
Warning message:
X matrix deemed to be singular; variable 2 in: coxph(Surv(age_at_death,
death) ~ project$pluralgp + project$yrborn + .........
>
2011 Jul 04
1
Contrastes con el paquete survey (svycontrast)
...*sex , design = shs, family =
quasibinomial())
m2 <- svyglm( intuse ~ (pmin(age, 35) + pmax(age, 35))*sex , design = shs,
family = quasibinomial())
summary(m) # OK. Coincide con el libro
summary(m2) # OK. Coincide con el libro
svycontrast(m2, quote('pmin(age, 35)' +'pmin(age, 35):sexfemale' )) #
¡Falla!
## Error en deriv.default(expr, names(datalist)) :
## expresión inválida en 'FindSubexprs'
##
sessionInfo() # Mi configuración
## R version 2.12.0 (2010-10-15)
## Platform: i486-pc-linux-gnu (32-bit)
## locale:
## [1] LC_CTYPE=es_ES.UTF-8 LC_NUMERIC=C
## [3] L...
2024 Sep 20
1
model.matrix() may be misleading for "lme" models
...kelihood: -253.629
Fixed: distance ~ Sex
(Intercept) Sex1
23.808239 1.160511
Random effects:
Formula: ~1 | Subject
(Intercept) Residual
StdDev: 1.595838 2.220312
Number of Observations: 108
Number of Groups: 27
> model.matrix(m, data=Orthodont)
(Intercept) SexFemale
1 1 0
2 1 0
3 1 0
. . .
106 1 1
107 1 1
108 1 1
attr(,"assign")
[1] 0 1
attr(,"contrasts")
attr(,"contrasts")$Sex
[1] "contr.treatment"
------...
2008 Aug 28
1
Adjusting for initial status (intercept) in lme growth models
...Sex:
fm2 = lme(distance ~ I(age-8) + Sex, random = ~ 1 + I(age-8) | Subject, data
= Orthodont)
R# summary(fm2)
Fixed effects: distance ~ I(age - 8) + Sex
Value Std.Error DF t-value p-value
(Intercept) 22.917 0.5134 80 44.64 0.000
I(age - 8) 0.660 0.0713 80 9.27 0.000
SexFemale -2.145 0.7575 25 -2.83 0.009
Along the lines of question #1, how would you get a growth model adjusting
for these Sex differences in initial status? I am looking for something
similar to adjusting for baseline differences between Sexes in ANCOVA. I
know Lord would not approve, but this...
2024 Sep 21
1
model.matrix() may be misleading for "lme" models
...x1
> ? 23.808239??? 1.160511
>
> Random effects:
> ?Formula: ~1 | Subject
> ??????? (Intercept) Residual
> StdDev:??? 1.595838 2.220312
>
> Number of Observations: 108
> Number of Groups: 27
>
> > model.matrix(m, data=Orthodont)
>
> ??? (Intercept) SexFemale
> 1???????????? 1???????? 0
> 2???????????? 1???????? 0
> 3???????????? 1???????? 0
>
> . . .
>
> 106?????????? 1???????? 1
> 107?????????? 1???????? 1
> 108?????????? 1???????? 1
> attr(,"assign")
> [1] 0 1
> attr(,"contrasts")
> attr(,&...
2011 Mar 31
2
ANCOVA for linear regressions without intercept
Hello R experts
I have two linear regressions for sexes (Male, Female, Unknown). All have a good correlation between body length (response variable) and head length (explanatory variable). I know it is not recommended, but for a good practical reason (the purpose of study is to find a single conversion factor from head length to body length), the regressions need to go through the origin (0