similar to: model.matrix()

Displaying 20 results from an estimated 20000 matches similar to: "model.matrix()"

2010 Feb 27
1
Newbie help with ANOVA and lm.
Would someone be so kind as to explain in English what the ANOVA code (anova.lm) is doing? I am having a hard time reconciling what the text books have as a brute force regression and the formula algorithm in 'R'. Specifically I see: p <- object$rank if (p > 0L) { p1 <- 1L:p comp <- object$effects[p1] asgn <-
2000 Jun 02
3
graphical parameters in plot
I'm using plot to make a simple plot but I want to control where the tick marks go on bot axes. The graphical parameters xaxp and yaxp seem to be ignored by the plot function so I tried setting them using op <- par(no.readonly=T) par(xaxp=c(-2.4,-2.2,5), yaxp=c(-2500,10000,6)) plot(...) par(op) but they are still ignored. Next I tried to use the axis function as follows op <-
1998 Apr 17
2
R-beta: lmsreg
Does R have a function like the S(plus) function, lmsreg, Least Median of Squares Regression? I am using R-0.61. Thank you, Mike Fleming mfleming at nass.usda.gov -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
1998 Apr 17
2
R-beta: lmsreg
Does R have a function like the S(plus) function, lmsreg, Least Median of Squares Regression? I am using R-0.61. Thank you, Mike Fleming mfleming at nass.usda.gov -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2012 Jan 03
1
returning information from functions via attributes rather than return list
I would like to ask for advice from R experts about the benefits or dangers of using attr to return information with an object that is returned from a function. I have a feeling as though I have cheated by using attributes, and wonder if I've done something fishy. Maybe I mean to ask, where is the dividing line between attributes and instance variables? The separation is not clear in my mind
2000 Apr 25
0
Wrong SEs in predict.lm(..., type="terms")
predict.lm(..., type="terms") gives wrong standard errors. Below, I have provided what I believe are the necessary fixes. However, there are subtleties, and the code needs careful checking. Some of the looping is surely not necessary, but it is surely best to begin with the minimum necessary changes. My tests, including checks against S-PLUS, have extended to fitting spline curves. I
2000 Apr 26
0
Wrong SEs in predict.lm(..., type="terms") (PR#528)
>From e980153 Tue Apr 25 14:42:27 2000 To: r-help@stat.math.ethz.ch Subject: Wrong SEs in predict.lm(..., type="terms") For what it is worth, I am using RW-1.0.0 under Windows 98. I submitted this earlier to r-help. There is one change below to my proposed corrected code: predict.lm(..., type="terms") gives wrong standard errors. Below, I have provided what I believe are
2005 Feb 16
2
problem with se.contrast()
I am having trouble getting standard errors for contrasts using se.contrast() in what appears to be a simple case to me. The following test example illustrates my problem: Lab <- factor(rep(c("1","2","3"),each=12)) Material <- factor(rep(c("A","B","C","D"),each=3,times=3)) Measurement <-
2006 Mar 13
1
anova.mlm (single-model case) does not handle factors? (PR#8679)
Full_Name: Yves Rosseel Version: 2.2.1 OS: i686-pc-linux-gnu Submission from: (NULL) (157.193.116.152) Dear developers, For the single-model case, the anova.mlm() function does not seem to handle multi-parameter predictors (eg factors) correctly. A toy example illustrates the problem: Y <- cbind(rnorm(100),rnorm(100),rnorm(100)) A <- factor(rep(c(1,2,3,4), each=25)) fit <- lm(Y ~ A)
2002 May 12
1
Dispelling Myths About Samba Encrypted passwords, NT_STATUS_LOGON _FAILURE and XP
Hi, I've been using samba for a while now with relatively simple configurations. I do however have a few questions: * When using encrypted passwords with samba, is it possible to authenticate users using the Unix user password(/etc/passwd)? * When using smbclient I get the error NT_STATUS_LOGON_FAILURE: added interface ip=192.168.1.1 bcast=192.168.1.255 nmask=255.255.255.0 Password:
2008 Feb 05
1
Extracting level-1 variance from lmer()
All, How does one extract the level-1 variance from a model fit via lmer()? In the code below the level-2 variance component may be obtained via subscripting, but what about the level-1 variance, viz., the 3.215072 term? (actually this term squared) Didn't see anything in the archives on this. Cheers, David > fm <- lmer( dv ~ time.num*drug + (1 | Patient.new), data=dat.new )
2014 Jan 03
1
Tab formatting in dummy.coef.R
Happy New Year I recognize this is a low priority issue, but... I'll fix it if you let me. There are some TABs where R style calls for 4 spaces. For example R-3.0.2/src/library/stats/R/dummy.coef.R. I never noticed this until today, when I was stranded on a deserted island with only the R source code and a Swiss Army knife (vi). Now I realize my ~.vimrc has tabstop set at 2, and it makes
2004 Nov 17
4
summary.lme() vs. anova.lme()
Dear R list: I modelled changes in a variable (mconc) over time (d) for individuals (replicate) given one of three treatments (treatment) using: mconc.lme <- lme(mconc~treatment*poly(d,2), random=~poly(d,2)|replicate, data=my.data) summary(mconc.lme) shows that the linear coefficient of one of the treatments is significantly different to zero, viz. Value Std.Error
2011 Oct 19
2
How to call a function defined within another function
Dear R-users, I would need some advices on the proper way to call a particular function. This function is called scope.char and it is embedded in the step.gam function from the gam package. I am trying to call scope.char directly in a script but I did not find the proper way to do so. Is this even possible? If so, what is the proper syntax? Thank you for your time and help. Sebastien
2013 Jan 29
3
how to suppress the intercept in an lm()-like formula method?
I'm trying to write a formula method for canonical correlation analysis, that could be called similarly to lm() for a multivariate response: cancor(cbind(y1,y2,y3) ~ x1+x2+x3+x4, data=, ...) or perhaps more naturally, cancor(cbind(y1,y2,y3) ~ cbind(x1,x2,x3,x4), data=, ...) I've adapted the code from lm() to my case, but in this situation, it doesn't make sense to include an
2005 Jul 20
1
nls
Dear R-helpers, I am trying to estimate a model that I am proposing, which consists of putting an extra hidden layer in the Markov switching models. In the simplest case the S(t) - Markov states - and w(t) - the extra hidden variables - are independent, and w(t) is constant. Formally the model looks like this: y(t)=c(1,y[t-1])%*%beta0*w+c(1,y[t-1])%*%beta1*(1-w). So I ran some simulations to
2013 Aug 18
1
How does R_UnboundValue and removing variables work?
Reading "R Internals" made me believe that R_UnboundValue was a placeholder that would be skipped over in variable lookup. viz. the section of R Internals "Hash tables" says "items are not actually deleted but have their value set to R_UnboundValue.", which seems to align with what I read in envir.c. So, I reasoned, if I have a function that returns R_UnboundValue,
2007 Nov 16
1
constraint matrices in vglm (VGAM package)
Hello R users, I am performing a multinomial logit regression and would like to constrain a few model coefficients to be equal. Here is my model: multi <- vglm(case123con ~ SNP_A1+SNP_A2+age, multinomial, work.analy) where case123con is a four level categorical variable (case 1, case 2, case 3, control) and SNP_A1 and SNP_A2 are indicator functions (yes/no). The output of this
2004 Jul 21
4
Bug#260743: logcheck-database: dhcp rule updates for failover support
Package: logcheck-database Version: 1.2.23 Severity: minor Hi, a couple of minor corrections to the dhcp rule sets: First of all, the hostname matching parts need to include the "._-" signs (maybe . is not needed but it might be). Then when using failover, log lines of type DHCPDISCOVER and DHCPREQUEST may be entailed by the string ": load balance to peer <somestring>".
2007 Jul 31
1
Extracting random parameters from summary lme and lmer
LS, I'm estimating multilevel regression models, using the lme-function from the nlme-package. Let's say that I estimated a model and stored it inside the object named 'model'. The summary of that model is shown below: Using summary(model)$tTable , I receive the following output: > summary(model)$tTable Value Std.Error DF t-value