1
$\begingroup$

Context: I'm trying to analyse some data where I have four explanatory variables named "Estimulo", "Barra", "DPI" and "Viendocon" (all of them are taken as factors) and one response variable, named "Vueltasmin", which is a numeric one.

As the explanatory variables are measured repeatedly (but not in a time-dependant manner, like in a repeated measures design) I chose a gls model. This gls strategy was selected after trying an lmer model, where I rejected Shapiro-Wilk's test for normality and had some conic-like pattern in a QQplot.

I try to modelate the variance using different strategies: VarFixed, VarIdent,Varpower and VarExp. Now here is where I can't go on: there is some error I'm getting that I'm not understanding what does it means.

For example, I run: m2a<-gls(Vueltasmin~DPI * Barra * Estimulo * Viendocon,weights=varFixed(~Barra),data=Datos)

and getting: Error in glsEstimate(object, control = control) : computed "gls" fit is singular, rank 18.

When I try to run a VarIdent, I run: m3<-gls(Vueltasmin~DPIBarraEstimulo*Viendocon, weights=varIdent(form=~1|Barra), data=Datos)

and get the same.

I leave the following link where you can find the script (named "Script tesis lic") and the data base I'm using (named "EXP1"):

http://dropcanvas.com/hy6ds

If anyone could help or orient me, I would be very grateful.

Thank you very much in advance,

Yair.

$\endgroup$

closed as off-topic by gung, John, kjetil b halvorsen, mdewey, Peter Flom Feb 6 '17 at 13:32

  • This question does not appear to be about statistics within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Please add a reproducible example for people to work with. $\endgroup$ – gung Feb 6 '17 at 1:28
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because it is about how to use R without a reproducible example. $\endgroup$ – gung Feb 6 '17 at 1:28
  • $\begingroup$ I'm sorry for not doing it at first, I have added my data base and R-script inn my question. Thanks for noticing! $\endgroup$ – ybarnatan Feb 6 '17 at 17:24
  • $\begingroup$ Links tend to go dead & the goal of the SE system is to create a permanent repository of high quality information about (say) statistics in the form of questions & answers. Please include a small reproducible example in the post. $\endgroup$ – gung Feb 6 '17 at 17:28
1
$\begingroup$

Since your data is about the repeated measurement, I suggest you to take the "nlme" or "lmer" package to analyze your data. for example,

m2a <- lme(Vueltasmin ~ DPI * Barra * Estimulo * Viendocon, random = ~1|Subject, data=Datos, na.action = na.omit, method = "REML")

Hope this is helpful to you!

$\endgroup$
  • $\begingroup$ Pcrainy Huang, first of all, thank you for your answer. Secondly, I tried your suggestion, but got another error message: "Error in MEEM(object, conLin, control$niterEM) : Singularity in backsolve at level 0, block 1 " So I'm not sure I got it yet. I added the script and the data base I'm using in case you might find my mistake inthere. Thanks a lot again! $\endgroup$ – ybarnatan Feb 6 '17 at 17:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.