similar to: scope, lme, ns, nlme, splines

Displaying 20 results from an estimated 700 matches similar to: "scope, lme, ns, nlme, splines"

2012 Sep 06
0
lme( y ~ ns(x, df=splineDF)) error
I would like to fit regression models of the form y ~ ns(x, df=splineDF) where splineDF is passed as an argument to a wrapper function. This works fine if the regression function is lm(). But with lme(), I get two different errors, depending on how I handle splineDF inside the wrapper function. A workaround is to turn the lme() command, along with the appropriate value of splineDF, into a text
2012 Sep 26
0
lme(y ~ ns(x, df=splineDF)) error
I would like to fit regression models of the form y ~ ns(x, df=splineDF) where splineDF is passed as an argument to a wrapper function. This works fine if the regression function is lm(). But with lme(), I get two different errors, depending on how I handle splineDF inside the wrapper function. A workaround is to turn the lme() command, along with the appropriate value of splineDF, into a text
2009 Nov 11
1
loop through variable names
Often I perform the same task on a series of variables in a dataframe, by looping through a character vector that holds the names and using paste(), eval(), and parse() inside the loop. For instance: thesevars<-names(environmental) environmental$ToyOutcome<-rnorm(nrow(environmental)) tableOfResults<-data.frame(var=thesevars) tableOfResults$Beta<- NA
2007 Jan 26
1
bootstrap bca confidence intervals for large number of statistics in one model; library("boot")
Sometimes one might like to obtain pointwise bootstrap bias-corrected, accelerated (BCA) confidence intervals for a large number of statistics computed from a single dataset. For instance, one might like to get (so as to plot graphically) bootstrap confidence bands for the fitted values in a regression model. (Example: Chiu S et al., Early Acceleration of Head Circumference in Children with
2004 Nov 30
4
adding regression curve to xyplot
Dear R-listers, It seems that predict() behaves differently within panel.xyplot. Am I doing something stupid? Thanks, Carlisle First, without xyplot(): > lmtest <- lm(t~s,data=subset(P100,whichLon100==1 & whichLat100==1)) > lmtest Call: lm(formula = s ~ t, data = subset(P100, whichLon100 == 1 & whichLat100 == 1)) Coefficients: (Intercept) t 33.3307
2012 Jul 02
1
Fitting and Plotting the fitted distributions
Dear all, I have wrote some sample code that would allow me easier fit fast many distributions and check which of the fits performs better. My sample code (that you can of course execute it looks like that) distrList<-list(   "exponential",  "geometric", "log-normal",  "normal", "Poisson") fitfunction<-function(Type,x){     return
2009 Feb 12
3
getting all pairwise combinations of elements in a character string
I'm able to do this as follows, but am wondering if anyone knows a simpler way which still avoids explicit loops? > (mystring <- letters[1:5]) [1] "a" "b" "c" "d" "e" > unlist(sapply(mystring[-length(mystring)], + function(x) paste(x,mystring[(grep(x,mystring)+1):length(mystring)],sep=""))) a1 a2 a3
2007 May 28
2
[LLVMdev] Problem in llvm gcc back-end
HI, While I testing some code, I found some problem on Union handling. I've wrte following test code, and it has union assignment. The code's output is from pointerToUnion: chars mystring, length 64 from original: chars mystring, length 8000 It's caused by second char member(charlength) of LongestMember. For union assignment, llvm-backend seems generates assigning each member of
2007 Nov 20
3
How to test views with Nested Resources and Partials
Hi everyone, I am relatively new to rspec and I am running into a wall in testing my views. I have a RESTful resource Contracts with a nested resource of Line_items. I am trying to figure out how to test the "edit" form of the Line_items. What complicates this is the nested routing and how to account for it, and that there is a partial form (_form.haml) that both the edit.haml and
2010 Mar 26
6
Rake argument error
Hi, I''m having a problem loading a sample data with simple rake command. rake db:fixtures:load When I run the above command,I get the following error $rake db:fixtures:load (in /home/raghu/www/photos) rake aborted! a YAML error occurred parsing /home/raghu/www/photos/test/fixtures/photos.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please
2011 Aug 04
3
#create tests fail when I add FriendlyId to my model
I am doing controller testing, and I can''t seem to get the create method test to pass when friendly_id is added to the mix. If I comment it out of the model, the tests all pass perfectly. The moment I add it back in, the error looks like this: 1) Error: test_create_valid(BrandsControllerTest): FriendlyId::BlankError: FriendlyId::BlankError
2011 Oct 05
1
Weird behaviour of tab characters in a string in R (vs Python)
Hello, I wanted to parse some information from a text, where fields are tab separated. When I copy the text into an R session (under emacs) like: mystring <- "field1 field2 field3" the tab character is replaced by a single space! For ex, if I type mystring, I get: "field1 field2 field3" The tabs have disappeared!!! I checked with Python that the text I copied was tab
2008 Aug 06
2
matching problem
I have a matching problem that I cant solve. mystring = "xxx{XX}yy{YYY}zzz{Z}" where "x","X","y","Y","z","Z" basiclly can be anything, letters, digits etc. I'm only interested in the content within each "{}". I am close but not really there yet. library(gsubfn) strapply(mystring,"\\{[^\\}]+",, perl=F)
2012 Jan 04
1
Warning message about closing a connection XXXX
Hello everyone, After running the following code, I obtain this error message. > mydata <- read.table(textConnection(mystring), + header=TRUE, sep=",", + row.names="id", na.strings=" ") > mydata Warning message: closing unused connection 3 (mystring) ===== However, when I attempt to run read.table() again and immediately submit the close() function
2011 Feb 13
3
String manipulation
Please consider following string: MyString <- "ABCFR34564IJVEOJC3434" Here you see that, there are 4 groups in above string. 1st and 3rd groups are for english letters and 2nd and 4th for numeric. Given a string, how can I separate out those 4 groups? Thanks for your time [[alternative HTML version deleted]]
2006 Jul 06
6
Class variables in templates/layouts
I''m having problems with class variables.. I have a class: class Content::ApplicantsController < ApplicationController layout "mylayout" @@tab = "mystring" [... the rest is standard scaffold-created stuff ...] and a layout (mylayout.rhtml): [...] <title><%= @@tab.capitalize %></title> [...] And I keep getting this error: uninitialized
2006 Aug 14
4
Test for string in string
Hi, Is there an easy way to test if a substring exists in a string? I''m using this check: if mystring.index(substring) > 0 but it doesn''t seem to be working.... Thanks! -- Posted via http://www.ruby-forum.com/.
2010 May 08
2
[LLVMdev] Should the function operand flag 'sret' match the flag in function declaration?
I have these two instructions, first one inside some procedure, second one is an outside declaration. Code verification passes and it runs, but incorrectly. Every time I saw such situation coming from c++ compiler, attributes 'noalias sret' appear on both call and declaration. Does such situation make sense, or (as I guess it is) a bug in verifier? I think verifier should match at
2009 Mar 30
1
Retrieving the context
Dear list, I have a general problem that I really don't know how to solve efficiently in R. Lets say we have a sequence of things, like for instance a string of words, that is stored in a file. We need all the words in a table format, so therefore we create an id for the word, that links the word to a file and the position of the word within the file, like: #In this case a very short file
2015 May 28
1
[LLVMdev] Passing ConstantDataArray to GetElementPtrInst
Hi, I'm having a hard time finding an answer to what I assume is a very basic idea. I'm trying to produce this llvm code using the LLVM api: %myString = alloca [13 x i8], i32 13 store [13 x i8] c"Hello world.\00", [13 x i8]* %myString %tmp1 = getelementptr [13 x i8]* %myString, i32 0, i32 0 %tmp2 = call i32 (i8*, ...)* @printf( i8* %tmp1 ) nounwind A simple Hello