similar to: Contrasts in lm

Displaying 20 results from an estimated 8000 matches similar to: "Contrasts in lm"

2009 Oct 19
1
Defining S3-methods for S4-objects: cannot coerce type 'S4' to vector of type 'integer'
In the 'doBy' package there is an esticon() function for calculating linear contrasts for various model types. I have defined an S3-method 'esticon.mer()' for 'mer' objects from the lme4 package. Building the package and invoking the method gives: > esticon(fm1, c(1,1)) Confidence interval ( WALD ) level = 0.95 Error in as.integer(x) : cannot coerce type 'S4'
2002 Dec 09
2
R as a COM client - is it possible?
Dear all, In S+, there are functions like create.ole.object call.ole.method release.ole.object for communicating with other programs which work as a COM server (on Windows). Is it possible to do something similar in R (I've studied the 'connections' facilities, but they do not seem to work). ========================================== S?ren H?jsgaard, PhD, Senior Scientist
2006 Jan 13
2
Saving data in an R package - how to maintain that t avariable is a 'factor' when it is coded as 1, 2, 3...
I have a .txt file obtained by saving a data frame in which the first four columns are factors (but represented as 1,2,3 etc). The first four lines are "Pig" "Evit" "Cu" "Litter" "Start" "Weight" "Feed" "Time" "4601" "1" "1" "1" 26.5 26.5 NA 1 "4601" "1"
2001 Oct 26
1
Bug or new concept in formatC?
As a sequel to my previous mail on cut, formatC does not produce what I have been taught is significant digits: > x <- c(1.0793,1.0796, 11.0954, 11.0736 ) > formatC(x,digits=3,format="g") [1] "1.08" "1.08" "11.1" "11.1" (3,3,3,3) significant digits OK > formatC(x,digits=3,format="f") [1] "1.079"
2001 Aug 23
3
Reading SAS version 8 data into R
Hi, SAS transport files created with the xport engine in SAS can be read using read.xport. However, the xport engine only works with SAS version 6, and consequently long variable names are not allowed... Can anyone tell me how to get SAS data (ver 8) into R (easily)? Thanks in advance S?ren H?jsgaard sorenh at agrsci.dk http://www.jbs.agrsci.dk/~sorenh
2001 Sep 05
3
Bug in ftable?? (Was: Two-way tables of data, etc)
Further to the discussion between Murray Jorgensen and Brian Ripley, it seems to me better to choose tabulations that will not come and bite you. Suppose your data are sligtly irregular, e.g. (for the sake of the argument): data( warpbreaks ) warpbreaks$variant <- rep( 1:5, len=54 ) attach( warpbreaks ) tb <- table( wool, tension, variant ) tb # in this case you would like to see: tp
2001 Sep 05
3
Bug in ftable?? (Was: Two-way tables of data, etc)
Further to the discussion between Murray Jorgensen and Brian Ripley, it seems to me better to choose tabulations that will not come and bite you. Suppose your data are sligtly irregular, e.g. (for the sake of the argument): data( warpbreaks ) warpbreaks$variant <- rep( 1:5, len=54 ) attach( warpbreaks ) tb <- table( wool, tension, variant ) tb # in this case you would like to see: tp
2001 Nov 21
1
Slow printing in batch?
For doumentation purposes I run a batch R program that does reshaping etc. of data and finally prints things. When I paste the code into an R-window everything runs in a few seconds, but in Batch mode i get in the output file the result below. Any clues why R uses 4 min to print a 1129\times 6 dataframe in batch mode? The scrit I use to run R is: c:\stat\r\%R_VERS%\bin\Rterm --no-restore
2011 Aug 06
1
How set lm() to don't return NA in summary()?
Hi, I've data from an incomplete fatorial design. One level of a factor doesn't has the levels of the other. When I use lm(), the summary() return NA for that non estimable parameters. Ok, I understant it. But I use contrast::contrast(), gmodels::estimable(), multcomp::glht() and all these fail when model has NA estimates. This is becouse vcov() and coef() has different dimensions. Is
2003 Jun 30
2
R as COM client (rather than server)
Hello all Can R be used as a COM client (rather than as a COM server)? The following (Splus) code shows the sort of thing I'd like to do: pMIM <- create.ole.object("mim31.Server") NoOutputLines <- call.ole.method(pMIM, "SendCmdLine", "show w") for (i in 1:NoOutputLines) show(call.ole.method(pMIM, "GetOutputLine")) release.ole.object(pMIM)
2001 Jan 02
1
sink() does not seem to release the file
I run Win2000, and when I try to write to a file and later use it it seems that R 1.02.0 has a firm grip on it: > version _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 2.0 year 2000 month 12 day 15
2004 May 03
1
Setting up contrasts
I am using the following model: lm <- lm(mydata[[variableName]] ~ Age + Gender + Group, data=mydata) There are 5 groups in "Group": nonc (the control), c1,c2,c3 and c4. How do I contrast nonc vs the others? and How do I contrast c1 vs other c's (ie c2,c3,c4 as a subgroup)? I have looked at the contrasts option in lm and model.matrix and am really none the wiser. Though it
2001 Dec 18
2
Aranda-Ornaz links for binary data
Hi, I would like apply different link functions from Aranda-Ordaz (1981) family to large binary dataset (n = 2000). The existing links in glm for binomial data (logit, probit, cloglog) are not adequate for my data, and I need to test some other transformations. Is it possible to do this in R? And how? Thank you for your help, /Sharon
2001 Nov 08
1
dyn.load'ing dll's created by Scompile causes R to crash
Dear all, I have used the Scompile package (by Mathhew Calder) on previous releases of R (on Windows), and it has worked well. However, R.1.3.1 crashes when dyn.load'ing C-functions created by Scompile. >From the last R-newsletter it seems that there has been some changes to how external routines are being included in version 1.3.1. I won't claim to understand the details, but I was
2002 Feb 01
4
ROC curves using R
I did some serach around. It seems that ROC curve computation is not supported on R. Anyone has some leads? Thanks. Jason ===== Jason G. Liao, Ph.D. Division of Biometrics UMDNJ School of Public Health 335 George Street, Suite 2200 New Brunswick, NJ 08903-2688 phone (732) 235-9748, fax (732) 235-9777 http://www.geocities.com/jg_liao __________________________________________________ Great
2004 Jun 21
2
frequencies
See ?hist For example hist(rnorm(100),plot=F,breaks=-3:3)$counts Regards Wayne -----Original Message----- From: Silvia Kirkman [mailto:silviakirkman@yahoo.com] Sent: 21 June 2004 14:01 To: r-help@stat.math.ethz.ch Subject: [R] frequencies Hi I have a set of fish lengths (cm) which I'd like to have divided into bins as specified by myself. I want to classify my bins as: 0<=x<0.5
2006 Aug 09
1
Joint confidence intervals for GLS models?
Dear All, I would like to be able to estimate confidence intervals for a linear combination of coefficients for a GLS model. I am familiar with John Foxton's helpful paper on Time Series Regression and Generalised Least Squares (GLS) and have learnt a bit about the gls function. I have downloaded the gmodels package so I can use the estimable function. The estimable function is very
2004 May 04
2
Seeing the definition of a function
Dear all, I was trying to see how the function 'confint' is defined. Doing > confint function (object, parm, level = 0.95, ...) UseMethod("confint") <environment: namespace:stats> does not really enlighten me. How can I get to see the implementation (I guess it should be possible according to the general philosophy of the R project)? Thanks in advance S??ren
2006 Apr 10
3
SE estimates for treatment groups from nlme
I am wondering how to obtain SE estimates for fixed effects from a nonlinear mixed effects model? I have fixed effects corresponding to three factors A, B and C with 2, 3 and 3 levels respectively. I have fit a model of the following general form: nlme1<-nlme(y~ SasympOrig(x, Asym, lrc), data=df, fixed=list(Asym~A*B*C, lrc~A*B*C), start=c(fixef(ETR.nlme)[1], rep(0,17), fixef(ETR.nlme)[2],
2005 Jun 20
2
Fwd: How to sample from a linear mixed model
Thanks. I wonder if there is a general way of extracting var(u) and var(e), which would be needed to simulate u and e. Clearly, one can get the estimated parameters, but is there a clever way of 'setting up' the matrices?? Best S??ren On 6/19/05, S??ren H??jsgaard <Soren.Hojsgaard at agrsci.dk> wrote: > I would like to draw a sample from a linear mixed model y=Xb+Zu+e which has