search for: datesets

Displaying 9 results from an estimated 9 matches for "datesets".

Did you mean: datasets
2010 Apr 12
1
rpart: Writing values of the leaves to a dateset
I'm fitting a regression tree with rpart and I want to write the values for every leaf in a dataset. As an example take the variable turnover. Let's suppose my tree for turnover has 30 leaves and I want to have 30 datasets with dataset 1 containing the turnover values of the units in leaf 1, dataset 2 containing turnover values for the observations in leaf 2 and so on. How can I do
2009 Dec 21
5
Help,Suggest me some methods to identify training set and test set!!!
I want to split my whole dateset to training set and test set, building model in training set, and validate model using test set. Now, How can I split my dataset to them reasonally. Please give me a hand, It is better to give me some R code. and I see some ways like using SOM to project whole independents to 2-dimensions and find some to be training set and others are test set. like below. I
2008 Mar 20
3
create matrix
...nrow = [a,b], exctracting the element for longevity, and then with byrow = TRUE letting the data be filled in by row. At the end I would have to set the last element in 'survival' to '1', and then combine all matrices into one single one. So far I've used Excel to create these datesets manually, but with more than 1000 individuals this gets really tedious. I haven't used R before for this sort of a bit more advanced data manipulation, and I would really appreciate any input/primer about how people would go about doing this. Thanks, Felix ________________________________...
2011 Dec 27
2
How to create a loop and then extract values from the list generated by cor.test
Dear all, I would like to conduct a Pearson's correlation using cor.test separately for each individual in my data set. Each individual has nine observations of the measurement variable 'Delta13C'. I can figure our how to do it manually one 'Individual_ID' at a time, but I cannot figure out how to automate the process (a loop I am guessing). In addition, I would like to
2005 Nov 03
1
Problems with abline adding regression line to a graph
Hello all, R2.1.1, W2k I try to make a plot of a simple regression model in this way: > with(njfA_bcd, { + plot(TC_OS.G31,Prot,cex = 2, col = "red", xlab= "TC/OS at GS32", + ylab="Grain crude protein (CP)") + }) This part works well and produces the datapoints as red circles. When I try to add a line, using a fitted linear model in a way that works perfect
2012 Apr 17
1
Function with multiple indices
Hi, I wrote a function which works for one group but not for multiple groups in several years. Could anyone help me out? The dateset has 3 variables, year, group, and sales. I want to calculate the annual group median adjusted sales performance for observation i in group j and year yr, I do the following procedure. For each yar, 1. exclude observation i from group j 2. calculate the sales median
2012 May 09
0
Survival data with time dependent covariate
http://r.789695.n4.nabble.com/file/n4619765/survival_file.png Hi everyone, This is what my data looks like, I haven't included the covariates, the example would get too large. uid id date feverstart dumfever 130 75 346465 2011-04-11 <NA> 0 131 75 360287 2011-04-18 <NA> 0 132 75
2007 Oct 01
3
export csv
Hello, I wanna know how to export a data frame to Excel. For example I wanna export this data frame > M[1:5,] var1 var2 distance 1 41 42 0.2 2 41 43 0.304347826086957 3 41 46 0.19047619047619 4 41 47 0.155555555555556 5 41 48 0.209302325581395 I don't know how to use write.table or write.csv to do this. Can you help me please? Thanks.
2009 Feb 17
2
creating a map
I'm trying to create a fairly basic map using R. What i want to get is the map of the country with circles representing a count of students in each state. What I've done so far is as following - map("state") symbols(data1$count,circles=log(data1$count)*3,fg=col,bg=col,add=T,inches=F) this gives me the map of the country, but one that's not populated by my counts. Does