Displaying 20 results from an estimated 10000 matches similar to: "a question on df of linear model"
2007 Jun 05
1
Can I treat subject as fixed effect in linear model
Hi,
There are 20 subjects grouped by Gender, each subject has 2 tissues
(normal vs. cancer).
In fact, it is a 2-way anova (factors: Gender and tissue) with tissue
nested in subject. I've tried the following:
Model 1: lme(response ~ tissue*Gender, random = ~1|subject)
Model 2: response ~ tissue*Gender + subject
Model 3: response ~ tissue*Gender
It seems like Model 1 is the correct one
2006 Feb 15
1
no convergence using lme
Hi. I was wondering if anyone might have some suggestions about how I can
overcome a problem of "iteration limit reached without convergence" when
fitting a mixed effects model.
In this study:
Outcome is a measure of heart action
Age is continuous (in weeks)
Gender is Male or Female (0 or 1)
Genotype is Wild type or knockout (0 or 1)
Animal is the Animal ID as a factor
2007 Jun 21
1
Result depends on order of factors in unbalanced designs (lme, anova)?
Dear R-Community!
For example I have a study with 4 treatment groups (10 subjects per group) and 4 visits. Additionally, the gender is taken into account. I think - and hope this is a goog idea (!) - this data can be analysed using lme as below.
In a balanced design everything is fine, but in an unbalanced design there are differences depending on fitting y~visit*treat*gender or
2006 Jun 04
1
Nested and repeated effects together?
Dear R people,
I am having a problem with modeling the following SAS code in R:
Class ID Gr Hemi Region Gender
Model Y = Gr Region Hemi Gender Gr*Hemi Gr*Region Hemi*Region
Gender*Region Gender*Hemi Gr*Hemi*Region Gender*Hemi*Region
Gr*Gender*Hemi*Region
Random Intercept Region Hemi /Subject = ID (Gr Gender)
I.e., ID is a random effect nested in Gr and Gender, leading to
ID-specific
2011 Dec 21
1
Predicting a linear model for all combinations
Lets say I have a linear model and I want to find the average expented
value of the dependent variable. So let's assume that I'm studying the
price I pay for coffee.
Price = B0 + B1(weather) + B2(gender) + ...
What I'm trying to find is the predicted price for every possible
combination of values in the independent variables.
So Expected price when:
weather=1, gender=male
weather=1,
2012 May 02
3
Consulta gráfica
Hola,
Por favor, ¿podríais indicarme qué recursos (librerías o ideas) pueden resultar de utilidad para crear un gráfico del estilo del de la figura 3.8 del siguiente link?
http://www.tsc.uvigo.es/BIO/Bioing/ChrLDoc3.html#3.5
Actualmente estoy utilizando funciones muy básicas y la verdad es que no me encuentro muy satisfecha con el resultado.
Muchas gracias.
Eva
[[alternative HTML
2012 Jan 22
1
How to construct a formula
Hi,
I need to construct a formula programaticly, and pass it to a function
such as the linear mixed model lme. The help says it requires "a
two-sided linear formula object describing the fixed-effects part of the
model" but I do not know how to create this formula. I have tried
various things using formula(x, ...), as.formula(object, env =
parent.frame()) and as.Formula(x, ...)
2007 Feb 14
1
nested model: lme, aov and LSMeans
I'm working with a nested model (mixed).
I have four factors: Patients, Tissue, sex, and tissue_stage.
Totally I have 10 patients, for each patient, there are 2 tissues
(Cancer vs. Normal).
I think Tissue and sex are fixed. Patient is nested in sex,Tissue is
nested in patient, and tissue_stage is nested in Tissue.
I tried aov and lme as the following,
> aov(gene ~ tissue + gender +
2007 Mar 08
1
how to assign fixed factor in lm
Hi there,
> Value=c(709,679,699,657,594,677,592,538,476,508,505,539)
> Lard=rep(c("Fresh","Rancid"),each=6)
> Gender=rep(c("Male","Male","Male","Female","Female","Female"),2)
> Food=data.frame(Value,Lard,Gender)
> Food
Value Lard Gender
1 709 Fresh Male
2 679 Fresh Male
3 699 Fresh
2008 May 09
1
lme() with two random effects
Hi all,
I have collected response time data from 178 participants ('sub') for
each combination of 4 within-Ss factors ('con','int','tone','cue').
Additionally, I have recorded the gender of each participant, so this
forms a between-Ss factor ('gender'). Normally this would be analyzed
using aov:
2011 Mar 17
2
Incorrect degrees of freedom in SEM model using lavaan
I have been trying to use lavaan (version 0.4-7) for a simple path model,
but the program seems to be computing far less degrees of freedom for my
model then it should have. I have 7 variables, which should give (7)(8)/2 =
28 covariances, and hence 28 DF. The model seems to only think I have 13
DF. The code to reproduce the problem is below. Have I done something
wrong, or is this something I
2007 Jun 27
1
how to use chi-square to test correlation question
Hi There,
There are 300 boy students and 100 girl students in a class. One interesting question is whether
boy is smarter than girl or not.
first given the exam with a difficulty level 1, the number of the student who got A is below
31 for boy, 10 for girl.
Then we increase the difficulty level of the exam to level 2, the number of the student who got A is below
32 for boy, 10 for girl.
We
2011 Nov 10
2
Listing tables together from random samples from a generated population?
.
HI there,
I'd like to show demonstrate how the chi-squared distribution works, so I've come up with a sample data frame of two categorical variables
y<-data.frame(gender=sample(c('Male', 'Female'), size=100000, replace=TRUE, c(0.5, 0.5)), tea=sample(c('Yes', 'No'), size=100000, replace=TRUE, c(0.5, 0.5)))
And I'd like to create a list of 100
2008 May 25
1
marginality principle / selecting the right type of SS for an interaction hypothesis
Hello,
I have a problem with selecting the right type of sums of squares for
an ANCOVA for my specific experimental data and hypotheses. I do have
a basic understanding of the differences between Type-I, II, and III
SSs, have read about the principle of marginality, and read Venable's
"Exegeses on Linear Models"
(http://www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf). I am pretty new to
2012 May 31
1
anova of lme objects (model1, model2) gives different results depending on order of models
Hello-
I understand that it's convention, when comparing two models using the
anova function anova(model1, model2), to put the more "complicated" (for
want of a better word) model as the second model. However, I'm using lme
in the nlme package and I've found that the order of the models actually
gives opposite results. I'm not sure if this is supposed to be the case
2008 May 04
2
Ancova_non-normality of errors
Hello Helpers,
I have some problems with fitting the model for my data...
-->my Literatur says (crawley testbook)=
Non-normality of errors-->I get a banana shape Q-Q plot with opening
of banana downwards
Structure of data:
origin wt pes gender
1 wild 5.35 147.0 male
2 wild 5.90 148.0 male
3 wild 6.00 156.0 male
4 wild 7.50 157.0 male
5 wild 5.90
2001 Oct 16
4
two way ANOVA with unequal sample sizes
Hi,
I am trying a two way anova with unequal sample sizes but results are not
as expected:
I take the example from Applied Linear Statistical Models (Neter et al.
pp889-897, 1996)
growth rate gender bone development
1.4 1 1
2.4 1 1
2.2 1 1
2.4 1 2
2.1 2 1
1.7 2 1
2.5 2 2
1.8 2 2
2 2 2
0.7 3 1
1.1 3 1
0.5 3 2
0.9 3 2
1.3 3 2
expected results are
2005 Apr 19
1
How to make combination data
Dear R-user,
I have a data like this below,
age <- c("young","mid","old")
married <- c("no","yes")
income <- c("low","high","medium")
gender <- c("female","male")
I want to make some of combination data like these,
age.income.dat <- expand.grid(age,
2008 Dec 03
2
changing colnames in dataframes
dear all,
I'm building new dataframes from bigger one's using e.g. columns F76, F83,
F90:
JJ<-data.frame( c( as.character(rep( gender,3))) , c( F76,6- F83, F90) )
Looking into JJ one has:
c.as.character.rep.gender..8...
c.6...F73..F78..F79..F82..6...F84..F94..F106..F109
1 w 2
2 w
2010 Jan 21
1
Simple effects with Design / rms ols() function
Hi everyone,
I'm having some difficulty getting "simple effects" for the ols()
function in the rms package. The example below illustrates my
difficulty -- I'll be grateful for any help.
#make up some data
exD <- structure(list(Gender = structure(c(1L, 2L, 1L, 2L, 1L, 1L, 1L,
2L, 1L, 2L, 2L, 2L, 1L, 2L), .Label = c("F", "M"), class = "factor"),